Spaces cause problems
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
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");
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");