]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libxml: Fix buffer overrun.
authorBruno Haible <bruno@clisp.org>
Sun, 29 Sep 2019 14:50:15 +0000 (16:50 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:21:09 +0000 (13:21 +0200)
Reported by GCC 8 -Wformat-truncation warning.

* gnulib-local/lib/libxml/parser.c (xmlParseReference): Increase size of buffer
'out' to 12 bytes.

gnulib-local/lib/libxml/parser.c

index 5813a6643e1580b89359066afbbb5fa164d5e5cc..486c16d402877c83d8d6ad06319fe4d4dfbb2c8a 100644 (file)
@@ -7009,7 +7009,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
      */
     if (NXT(1) == '#') {
        int i = 0;
-       xmlChar out[10];
+       xmlChar out[12];
        int hex = NXT(2);
        int value = xmlParseCharRef(ctxt);