]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libxml: Fix a gcc 13 -Wformat-truncation warning.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Dec 2024 10:24:11 +0000 (11:24 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 31 Dec 2024 10:07:08 +0000 (11:07 +0100)
* gnulib-local/lib/libxml/uri.c (xmlURIEscape): Use a buffer of size 12, not 10.

gnulib-local/lib/libxml/uri.c

index 560890ceb66aa360aa91005ffca0cb43e542aa21..e5031f66239efdd463df18d91ed6dd5e45852ba5 100644 (file)
@@ -1,5 +1,5 @@
 /* libxml2 - Library for parsing XML documents
- * Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ * Copyright (C) 2006-2024 Free Software Foundation, Inc.
  *
  * This file is not part of the GNU gettext program, but is used with
  * GNU gettext.
@@ -1837,9 +1837,9 @@ xmlURIEscape(const xmlChar * str)
     }
 
     if (uri->port) {
-        xmlChar port[10];
+        xmlChar port[12];
 
-        snprintf((char *) port, 10, "%d", uri->port);
+        snprintf((char *) port, 12, "%d", uri->port);
         ret = xmlStrcat(ret, BAD_CAST ":");
         ret = xmlStrcat(ret, port);
     }