diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 511f555ef5..66b2701c14 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2007-08-04 Michael Snyder + * breakpoint.c (print_one_breakpoint): Off by one error. + * tracepoint.c (add_register): Off by one error. (stringify_collection_list): Free malloc buffer. diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8c27a24ae9..f59f1da143 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3414,7 +3414,7 @@ print_one_breakpoint (struct breakpoint *b, /* 2 */ annotate_field (1); - if (((int) b->type > (sizeof (bptypes) / sizeof (bptypes[0]))) + if (((int) b->type >= (sizeof (bptypes) / sizeof (bptypes[0]))) || ((int) b->type != bptypes[(int) b->type].type)) internal_error (__FILE__, __LINE__, _("bptypes table does not describe type #%d."),