diff options
author | Mike Hommey <glandium@debian.org> | 2008-03-05 23:42:30 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2008-03-05 23:42:30 +0100 |
commit | 729c7fcf0cad48e02744aefa694892b3761d4e4f (patch) | |
tree | 1fc22a413c3fdfe5037228439fa4566d740d4b4c | |
parent | 63afea9fc5bf75f1e65aedcddb26a20a26666bca (diff) | |
download | libxml2-729c7fcf0cad48e02744aefa694892b3761d4e4f.tar.gz |
* error.c: Don't grow error buffer indefinitely when vsnprintf returns -1,
which, if it happens, on glibc-based systems, will happen indefinitely.
Closes: #456653.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | error.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 827313f..d76b9a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ libxml2 (2.6.31.dfsg-2) UNRELEASED; urgency=low * xstc/Makefile.am, xstc/Makefile.in: Properly clean generated files. * nanohttp.c: Apply fix from svn revision 3685 to allocate enough memory for the Host HTTP header when containing a port number. Closes: #464173. + * error.c: Don't grow error buffer indefinitely when vsnprintf returns -1, + which, if it happens, on glibc-based systems, will happen indefinitely. + Closes: #456653. -- Mike Hommey <glandium@debian.org> Tue, 04 Mar 2008 22:36:28 +0100 @@ -45,7 +45,7 @@ void XMLCDECL xmlGenericErrorDefaultFunc (void *ctx ATTRIBUTE_UNUSED, if (chars > -1) \ size += chars + 1; \ else \ - size += 100; \ + break; \ if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\ break; \ } \ |