segv in read_a_source_file
Alan Modra
amodra@gmail.com
Mon Sep 30 23:11:00 GMT 2024
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;
--
Alan Modra
More information about the Binutils
mailing list