[maemo-commits] [maemo-commits] r15208 - in projects/haf/trunk/hildon-fm: . debian hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Feb 20 16:54:22 EET 2008
Author: marivoll
Date: 2008-02-20 16:54:20 +0200 (Wed, 20 Feb 2008)
New Revision: 15208

Modified:
   projects/haf/trunk/hildon-fm/ChangeLog
   projects/haf/trunk/hildon-fm/debian/changelog
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
Log:
	* hildon-fm/hildon-file-system-smb.c
	(my_file_folder_collaps_path): Avoid calling strcpy with
	two pointers into the same string (N79427).


Modified: projects/haf/trunk/hildon-fm/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-fm/ChangeLog	2008-02-20 14:51:08 UTC (rev 15207)
+++ projects/haf/trunk/hildon-fm/ChangeLog	2008-02-20 14:54:20 UTC (rev 15208)
@@ -1,5 +1,9 @@
 2008-02-20  Marius Vollmer  <marius.vollmer at nokia.com>
 
+	* hildon-fm/hildon-file-system-smb.c
+	(my_file_folder_collaps_path): Avoid calling strcpy with
+	two pointers into the same string (N79427).
+
 	* hildon-fm/hildon-file-chooser-dialog.c (create_folder_callback):
 	Ignore unexpected handles instead of aborting (N76517).
 

Modified: projects/haf/trunk/hildon-fm/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-fm/debian/changelog	2008-02-20 14:51:08 UTC (rev 15207)
+++ projects/haf/trunk/hildon-fm/debian/changelog	2008-02-20 14:54:20 UTC (rev 15208)
@@ -1,6 +1,6 @@
 libhildonfm (1:2.0.1~unreleased) unstable; urgency=low
 
-  * Fixes: NB#76517.
+  * Fixes: NB#76517, NB#79427.
 
  -- Marius Vollmer <marius.vollmer at nokia.com>  Wed, 20 Feb 2008 16:42:40 +0200
 

Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2008-02-20 14:51:08 UTC (rev 15207)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-smb.c	2008-02-20 14:54:20 UTC (rev 15208)
@@ -381,11 +381,11 @@
 
   const char *str = gtk_file_path_get_string (from);
   char *new_str = g_strdup (str);
-  char *last_slash = strchr_reverse (new_str, NULL, '/');
-  char *second_last_slash = strchr_reverse (new_str, last_slash, '/');
+  char *last_slash = strchr_reverse (str, NULL, '/');
+  char *second_last_slash = strchr_reverse (str, last_slash, '/');
 
-  if (second_last_slash)
-    strcpy (second_last_slash + 1, last_slash + 1);
+  if (second_last_slash && new_str)
+    strcpy (new_str + (second_last_slash - str) + 1, last_slash + 1);
 
   return gtk_file_path_new_steal (new_str);
 }


More information about the maemo-commits mailing list