Fix gas crash with unreasonably long lines
authorNathan Sidwell <nathan@acm.org>
Fri, 4 Nov 2016 03:42:23 +0000 (20:42 -0700)
committerNathan Sidwell <nathan@acm.org>
Sat, 5 Nov 2016 04:26:34 +0000 (21:26 -0700)
commit9cee1c1eb3d7a39279f7a0dae94bb38ab1106d1b
tree714bb01f07d2b583a0830d8bef912fe6477f8f2c
parent26c4b26f0cc51f04cdaba3c9e6ff09032bd10d8b
Fix gas crash with unreasonably long lines

gas/
* input-scrub.c (partial_size): Make size_t.
(buffer_length): Likewise.  Adjust meaning.
(struct input_save): Adjust partial_size type.
(input_scrub_reinit): New.
(input_scrub_push, input_scrub_begin): Use it.
(input_scrub_next_buffer): Fix buffer extension logic. Only scan
newly read buffer for newline.
gas/ChangeLog
gas/input-scrub.c