[PATCH] Potential Crasher in nautilus-recent.c



Hey Guys,

I have created a patch that is supposed to fix the bug at
http://bugzilla.gnome.org/show_bug.cgi?id=350685. Could someone review
it?

--- nautilus-recent.c	2006-08-15 17:16:27.000000000 -0400
+++ nautilus-recent.c	2006-08-15 17:01:05.000000000 -0400
@@ -63,7 +63,7 @@
	if (application != NULL)
		recent_data.app_exec = g_strdup
(gnome_vfs_mime_application_get_exec (application));
	else
-		recent_data.app_exec = DEFAULT_APP_EXEC;
+		recent_data.app_exec = g_strdup (DEFAULT_APP_EXEC);

	recent_data.groups = NULL;
	recent_data.is_private = FALSE;

The problem is a nautilus crash when opening a file of type that does
not have an application assigned to it. In that case, (application ==
NULL) and there is g_free(recent_data.app_exec) call on line 76, while
recent_data.app_exec was assigned a literal string DEFAULT_APP_EXEC.

Regards,
Rouslan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]