mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 08:22:16 +01:00 
			
		
		
		
	gdesktopappinfo: Add checks for empty argv
There shouldn’t be any issues here with empty argv arrays since an empty `Exec=` line is already checked for. Encode that explicitly with an assertion. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
		| @@ -1880,6 +1880,10 @@ g_desktop_app_info_load_from_keyfile (GDesktopAppInfo *info, | ||||
|       else | ||||
|         { | ||||
|           char *t; | ||||
|  | ||||
|           /* Since @exec is not an empty string, there must be at least one | ||||
|            * argument, so dereferencing argv[0] should return non-NULL. */ | ||||
|           g_assert (argc > 0); | ||||
|           t = g_find_program_in_path (argv[0]); | ||||
|           g_strfreev (argv); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user