From: Bruno Haible Date: Thu, 12 Dec 2024 10:24:11 +0000 (+0100) Subject: libxml: Fix a gcc 13 -Wformat-truncation warning. X-Git-Tag: v0.24~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f751661ebb1c345f63150b23de084c15300a7e11;p=thirdparty%2Fgettext.git libxml: Fix a gcc 13 -Wformat-truncation warning. * gnulib-local/lib/libxml/uri.c (xmlURIEscape): Use a buffer of size 12, not 10. --- diff --git a/gnulib-local/lib/libxml/uri.c b/gnulib-local/lib/libxml/uri.c index 560890ceb..e5031f662 100644 --- a/gnulib-local/lib/libxml/uri.c +++ b/gnulib-local/lib/libxml/uri.c @@ -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); }