From: Alan Modra Date: Mon, 30 Sep 2024 22:30:32 +0000 (+0930) Subject: segv in read_a_source_file X-Git-Tag: gdb-16-branchpoint~766 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=444ae19249ac2d1221a01d87deb1aeceb535e5b4;p=thirdparty%2Fbinutils-gdb.git segv in read_a_source_file On some paths through read_a_source file, "s" may not be set. * read.c (read_a_source_file): Correct code ignoring comment. --- diff --git a/gas/read.c b/gas/read.c index 71915eebd19..bc31d328a3d 100644 --- a/gas/read.c +++ b/gas/read.c @@ -1397,6 +1397,7 @@ read_a_source_file (const char *name) if (next_char && strchr (line_comment_chars, next_char)) { /* Its a comment, ignore it. Note: Not ignore_rest_of_line ()! */ + s = input_line_pointer; while (s <= buffer_limit) if (is_end_of_line (*s++)) break;