do not segfault on empty filename to escape.
authorGustavo Sverzut Barbieri <barbieri@gmail.com>
Tue, 9 Jun 2009 10:25:25 +0000 (10:25 +0000)
committerGustavo Sverzut Barbieri <barbieri@gmail.com>
Tue, 9 Jun 2009 10:25:25 +0000 (10:25 +0000)
Avoid case where e_exec (and possible others) gives
e_util_filename_escape() a NULL parameter, actually another bug, but
does not hurt to safe guard this one.

By: manio

SVN revision: 40979

src/bin/e_utils.c

index a941ee3..177cbfe 100644 (file)
@@ -652,6 +652,7 @@ e_util_filename_escape(const char *filename)
    char *q;
    static char buf[4096];
 
+   if (!filename) return NULL;
    p = filename;
    q = buf;
    while (*p)