tekhex: Uninitialised read
* tekhex.c (pass_over): Check is_eof before reading buffer.
This commit is contained in:
parent
d262797294
commit
b3b360dec7
@ -1,3 +1,7 @@
|
|||||||
|
2020-03-31 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* tekhex.c (pass_over): Check is_eof before reading buffer.
|
||||||
|
|
||||||
2020-03-30 Nick Clifton <nickc@redhat.com>
|
2020-03-30 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/pr25662
|
PR binutils/pr25662
|
||||||
|
@ -525,7 +525,7 @@ pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *))
|
|||||||
|
|
||||||
/* Find first '%'. */
|
/* Find first '%'. */
|
||||||
is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
|
is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
|
||||||
while (*src != '%' && !is_eof)
|
while (!is_eof && *src != '%')
|
||||||
is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
|
is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
|
||||||
|
|
||||||
if (is_eof)
|
if (is_eof)
|
||||||
|
Loading…
Reference in New Issue
Block a user