mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-10-24 01:09:01 +03:00
fix: add length check to xmlURIEscapeStr in uri.c
Commit 538b2e38 fixed xmlBuildRelativeURISafe for the pattern where
xmlStrlen() returns 0 for strings longer than INT_MAX, but
xmlURIEscapeStr was not fixed. Without the check, len = 0 + 20, and
the write loop eventually overflows via int wrapping of the out counter.
Add a return NULL guard when xmlStrlen returns 0.
This commit is contained in:
committed by
Daniel Garcia Moreno
parent
e41032ae9f
commit
b9da8bcc78
Reference in New Issue
Block a user