Prevent seg-fault in gas reading a binary input file.

PR 19630
	* read.c (read_a_source_file): Check for assemble_one returning
	with input_line_pointer set to NULL.
This commit is contained in:
Nick Clifton 2016-02-19 13:19:57 +00:00
parent 3d13c64701
commit 3be64886b5
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2016-02-19 Nick Clifton <nickc@redhat.com>
PR 19630
* read.c (read_a_source_file): Check for assemble_one returning
with input_line_pointer set to NULL.
016-02-19 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* listing.c (rebuffer_line): Change return type to void.

View file

@ -1176,6 +1176,11 @@ read_a_source_file (char *name)
assemble_one (s); /* Assemble 1 instruction. */
/* PR 19630: The backend may have set ilp to NULL
if it encountered a catastrophic failure. */
if (input_line_pointer == NULL)
as_fatal (_("unable to continue with assembly."));
*input_line_pointer++ = nul_char;
/* We resume loop AFTER the end-of-line from