Fix some broken logic here, p = strrchr (path, '/') + 1 will *never* be

2002-08-28  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-display.c (make_safe_filename): Fix some broken logic here,
	`p = strrchr (path, '/') + 1` will *never* be NULL!! If the
	strrchr returns NULL, then that expression will evaluate to 0x1!!

svn path=/trunk/; revision=17901
This commit is contained in:
Jeffrey Stedfast
2002-08-28 20:00:31 +00:00
committed by Jeffrey Stedfast
parent 6f794e4634
commit d2773d37ec
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2002-08-28 Jeffrey Stedfast <fejj@ximian.com>
* mail-display.c (make_safe_filename): Fix some broken logic here,
`p = strrchr (path, '/') + 1` will *never* be NULL!! If the
strrchr returns NULL, then that expression will evaluate to 0x1!!
* main.c (main): We now always need to init gconf for our later
call to e_proxy_init() which initialises the proxy settings for
soup to use.

View File

@ -226,9 +226,9 @@ make_safe_filename (const char *prefix,CamelMimePart *part)
else
safe = g_strdup_printf ("%s/%s", prefix, name);
p = strrchr (safe, '/') + 1;
p = strrchr (safe, '/');
if (p)
e_filename_make_safe (p);
e_filename_make_safe (p + 1);
return safe;
}