aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-10-01 08:00:32 +0930
committerAlan Modra <amodra@gmail.com>2024-10-01 08:35:00 +0930
commit444ae19249ac2d1221a01d87deb1aeceb535e5b4 (patch)
tree87098a6f399c9cc9fc88c0cc1c413adc8e2745d7 /gas/read.c
parent656f8fbaae34cb37bda5110cbc8c79c6a2aaa847 (diff)
downloadbinutils-444ae19249ac2d1221a01d87deb1aeceb535e5b4.zip
binutils-444ae19249ac2d1221a01d87deb1aeceb535e5b4.tar.gz
binutils-444ae19249ac2d1221a01d87deb1aeceb535e5b4.tar.bz2
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.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gas/read.c b/gas/read.c
index 71915ee..bc31d32 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;