Merge branch 'protect-argv-string' into 'main'

gspawn-win32: Fix potential integer overflows in argv handling

See merge request GNOME/glib!4570
This commit is contained in:
Philip Withnall
2025-04-01 16:14:35 +00:00
2 changed files with 4 additions and 4 deletions

View File

@@ -80,8 +80,8 @@ protect_wargv (gint argc,
{
wchar_t *p = wargv[i];
wchar_t *q;
gint len = 0;
gint pre_bslash = 0;
size_t len = 0;
size_t pre_bslash = 0;
gboolean need_dblquotes = FALSE;
while (*p)
{

View File

@@ -253,8 +253,8 @@ protect_argv_string (const gchar *string)
{
const gchar *p = string;
gchar *retval, *q;
gint len = 0;
gint pre_bslash = 0;
size_t len = 0;
size_t pre_bslash = 0;
gboolean need_dblquotes = FALSE;
while (*p)
{