diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-08-29 04:00:31 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-08-29 04:00:31 +0800 |
commit | d2773d37ec1c4cb3d372b43a7f396cb4d883373a (patch) | |
tree | 8055acfeaa6551da3bc4608ca3e1ba740b3eceb3 /mail | |
parent | 6f794e46346557057768ac38922ca96ea6a68fee (diff) | |
download | gsoc2013-evolution-d2773d37ec1c4cb3d372b43a7f396cb4d883373a.tar.gz gsoc2013-evolution-d2773d37ec1c4cb3d372b43a7f396cb4d883373a.tar.zst gsoc2013-evolution-d2773d37ec1c4cb3d372b43a7f396cb4d883373a.zip |
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
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 4 | ||||
-rw-r--r-- | mail/mail-display.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 14ee1c83b2..af9da6c5f5 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -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. diff --git a/mail/mail-display.c b/mail/mail-display.c index 9681be7b1f..9f3ad1c84b 100644 --- a/mail/mail-display.c +++ b/mail/mail-display.c @@ -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; } |