[patch] directory_history_add corrupts its argument



=> panel->cwd gets damaged and ftpfs malfunctions for non-anonymous servers
--
Jindrich Makovicka
Index: main.c
===================================================================
RCS file: /cvs/gnome/mc/src/main.c,v
retrieving revision 1.283
diff -u -b -B -r1.283 main.c
--- main.c	22 Mar 2003 05:28:08 -0000	1.283
+++ main.c	4 May 2003 19:23:41 -0000
@@ -687,12 +687,12 @@
 }
 
 void
-directory_history_add (struct WPanel *panel, char *s)
+directory_history_add (struct WPanel *panel, const char *s)
 {
     char *text;
 
     text = g_strdup (s);
-    strip_password (s, 1);
+    strip_password (text, 1);
 
     panel->dir_history = list_append_unique (panel->dir_history, text);
 }


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