Fix seg fault attempting to unget an EOF character.

PR gas/20898
	* app.c (do_scrub_chars): Do not attempt to unget EOF.
This commit is contained in:
Nick Clifton 2016-12-01 15:20:19 +00:00
parent 4cbd84083e
commit 69ace22001
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2016-12-01 Nick Clifton <nickc@redhat.com>
PR gas/20898
* app.c (do_scrub_chars): Do not attempt to unget EOF.
PR gas/20897
* subsegs.c (subsegs_print_statistics): Do nothing if no output
file was created.

View File

@ -1188,7 +1188,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
state = -2;
break;
}
else
else if (ch2 != EOF)
{
UNGET (ch2);
}