* linespec.c (decode_line_1): Check for null before dereference.
2011-03-01 Michael Snyder <msnyder@vmware.com>
+ * linespec.c (decode_line_1): Check for null before dereference.
+
* reverse.c (record_restore): Move null-check to before pointer
dereference.
char *copy;
/* This says whether or not something in *ARGPTR is quoted with
completer_quotes (i.e. with single quotes). */
- int is_quoted;
+ int is_quoted = 0;
/* Is *ARGPTR is enclosed in double quotes? */
int is_quote_enclosed;
int is_objc_method = 0;
/* See if arg is *PC. */
- if (**argptr == '*')
- return decode_indirect (argptr);
+ if (*argptr)
+ {
+ if (**argptr == '*')
+ return decode_indirect (argptr);
+
+ is_quoted = (strchr (get_gdb_completer_quote_characters (),
+ **argptr) != NULL);
+ }
- is_quoted = (*argptr
- && strchr (get_gdb_completer_quote_characters (),
- **argptr) != NULL);
if (is_quoted)
end_quote = skip_quoted (*argptr);