Quote filenames
authorTim Pepper <timothy.c.pepper@linux.intel.com>
Mon, 26 Nov 2012 22:14:20 +0000 (14:14 -0800)
committerTim Pepper <timothy.c.pepper@linux.intel.com>
Mon, 26 Nov 2012 22:14:20 +0000 (14:14 -0800)
Spaces cause problems

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
src/coredump.c
src/find_file.c

index 3610845..a378eea 100644 (file)
@@ -225,7 +225,7 @@ static struct oops *extract_core(char *fullpath, char *appfile, char *reportname
 
        fprintf(stderr, "+ extract_core() called for %s\n", fullpath);
 
-       if (asprintf(&command, "LANG=C gdb --batch -f %s %s -x /etc/corewatcher/gdb.command 2> /dev/null", appfile, fullpath) == -1)
+       if (asprintf(&command, "LANG=C gdb --batch -f '%s' '%s' -x /etc/corewatcher/gdb.command 2> /dev/null", appfile, fullpath) == -1)
                return NULL;
 
        file = popen(command, "r");
index e8bc93e..fe1bf2d 100644 (file)
@@ -65,7 +65,7 @@ char *find_causingapp(char *fullpath)
        FILE *file = NULL;
        char *app = NULL, *command = NULL;
 
-       if (asprintf(&command, "eu-readelf -n %s", fullpath) == -1)
+       if (asprintf(&command, "eu-readelf -n '%s'", fullpath) == -1)
                return NULL;
 
        file = popen(command, "r");