From f5a8e22b7eff2102d6a187dc331b13a8ea55af17 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 25 Nov 2010 23:17:30 +0000 Subject: [PATCH] 2010-11-25 Marc Khouzam PR breakpoints/12217 * breakpoint.c (is_marker_spec): Check for NULL. --- gdb/ChangeLog | 6 ++++++ gdb/breakpoint.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aa79939..173af54 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2010-11-25 Marc Khouzam + + PR breakpoints/12217 + + * breakpoint.c (is_marker_spec): Check for NULL. + 2010-11-25 Pedro Alves * breakpoint.h: No longer include python.h or python-internal.h. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 6b55313..2f4e10e 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -222,7 +222,7 @@ static void trace_pass_command (char *, int); /* Assuming we're creating a static tracepoint, does S look like a static tracepoint marker spec ("-m MARKER_ID")? */ #define is_marker_spec(s) \ - (strncmp (s, "-m", 2) == 0 && ((s)[2] == ' ' || (s)[2] == '\t')) + (s != NULL && strncmp (s, "-m", 2) == 0 && ((s)[2] == ' ' || (s)[2] == '\t')) /* A reference-counted struct command_line. This lets multiple breakpoints share a single command list. */ -- 2.7.4