* libtextstyle/gnulib-local/lib/glib/gstrfuncs.c (g_strdup_vprintf): Don't
assume that vasprintf leaves the pointed-to variable unchanged when it fails.
/* GLIB - Library of useful routines for C programming
- * Copyright (C) 2006-2023 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.
g_strdup_vprintf (const gchar *format,
va_list args)
{
- gchar *string = NULL;
+ gchar *string;
- g_vasprintf (&string, format, args);
+ if (g_vasprintf (&string, format, args) < 0)
+ return NULL;
return string;
}