mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +01:00 
			
		
		
		
	Merge branch 'fix-heap-corruption' into 'master'
glib-unix.c: fix heap corruption in g_unix_get_passwd_entry See merge request GNOME/glib!1431
This commit is contained in:
		| @@ -485,7 +485,7 @@ g_unix_get_passwd_entry (const gchar  *user_name, | ||||
|        * loop until it’s big enough). Add 6 extra bytes to work around a bug in | ||||
|        * macOS < 10.3. See #156446. | ||||
|        */ | ||||
|       buffer = g_malloc0 (sizeof (buffer) + string_buffer_size + 6); | ||||
|       buffer = g_malloc0 (sizeof (*buffer) + string_buffer_size + 6); | ||||
|  | ||||
|       errno = 0; | ||||
|       retval = getpwnam_r (user_name, &buffer->pwd, buffer->string_buffer, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user