aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Seitz <keiths@redhat.com>2001-03-14 18:36:45 +0000
committerKeith Seitz <keiths@redhat.com>2001-03-14 18:36:45 +0000
commit91c1720e680c679cbfd6314e72bd6ba2b383e31f (patch)
tree6d0285650734f14a9c6e60aa03243b16ba054818
parent3cc122b3fe78d8abf3e3d5dd0c462f75e4941b37 (diff)
downloadgdb-91c1720e680c679cbfd6314e72bd6ba2b383e31f.zip
gdb-91c1720e680c679cbfd6314e72bd6ba2b383e31f.tar.gz
gdb-91c1720e680c679cbfd6314e72bd6ba2b383e31f.tar.bz2
* linespec.c (decode_line_1): Skip argptr over a leading
double quote. Prevents alloc of 0 bytes and memcpy of -1 bytes.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/linespec.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fc5477c..a4e0c14 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-14 Keith Seitz <keiths@cygnus.com>
+
+ * linespec.c (decode_line_1): Skip argptr over a leading
+ double quote. Prevents alloc of 0 bytes and memcpy of -1 bytes.
+
2001-03-14 Kevin Buettner <kevinb@redhat.com>
* config/djgpp/fnchange.lst (ia64-aix-nat.c): Add entry.
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 266ac6d..3f790cc 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -612,10 +612,10 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
s = NULL;
p = *argptr;
- if (p[0] == '"')
+ if (**argptr == '"')
{
is_quote_enclosed = 1;
- p++;
+ (*argptr)++;
}
else
is_quote_enclosed = 0;