From: Aleksandar Ristovski Date: Fri, 26 Aug 2011 17:58:57 +0000 (+0000) Subject: * linespec.c (symtab_from_filename): Check for the end of string. X-Git-Tag: binutils-2_22-branchpoint~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edb2aadf8b9b8b968917fad4727f039f0e10f7fb;p=thirdparty%2Fbinutils-gdb.git * linespec.c (symtab_from_filename): Check for the end of string. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a5b491b1e4..5179af7f4ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-08-26 Aleksandar Ristovski + + * linespec.c (symtab_from_filename): Check for the end of string. + 2011-08-26 Marc Khouzam PR mi/11912 diff --git a/gdb/linespec.c b/gdb/linespec.c index b96c79f0e34..37ec3684245 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1835,6 +1835,8 @@ symtab_from_filename (char **argptr, char *p, int is_quote_enclosed) } /* Discard the file name from the arg. */ + if (*p1 == '\0') + return file_symtab; p = p1 + 1; while (*p == ' ' || *p == '\t') p++;