mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 00:06:24 +01:00
Merge branch 'filename-length' into 'main'
gwin32packageparser: Fix read past end of buffer Closes #2454 See merge request GNOME/glib!2213
This commit is contained in:
commit
14f583bc23
@ -390,7 +390,7 @@ g_win32_package_parser_enum_packages (GWin32PackageParserCallback callback,
|
||||
wcs_path = LoadedWindowsGetStringRawBuffer (path, NULL);
|
||||
manifest_filename_size = wcslen (wcs_path) + wcslen (bslash_appmanifest);
|
||||
manifest_filename = g_new (wchar_t, manifest_filename_size + 1);
|
||||
memcpy (manifest_filename, wcs_path, manifest_filename_size * sizeof (wchar_t));
|
||||
memcpy (manifest_filename, wcs_path, wcslen (wcs_path) * sizeof (wchar_t));
|
||||
memcpy (&manifest_filename[wcslen (wcs_path)], bslash_appmanifest, (wcslen (bslash_appmanifest) + 1) * sizeof (wchar_t));
|
||||
|
||||
memset (sax, 0, sizeof (*sax));
|
||||
|
Loading…
Reference in New Issue
Block a user