projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d262797
)
tekhex: Uninitialised read
author
Alan Modra
<amodra@gmail.com>
Tue, 31 Mar 2020 04:21:25 +0000
(14:51 +1030)
committer
Alan Modra
<amodra@gmail.com>
Tue, 31 Mar 2020 04:34:21 +0000
(15:04 +1030)
* tekhex.c (pass_over): Check is_eof before reading buffer.
bfd/ChangeLog
patch
|
blob
|
history
bfd/tekhex.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index bd43b676ba15d9f1be9be5c95fd58fde084fd186..b3441335f06d21b49c7f4562fa6c0d6b031bf1a6 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-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>
PR binutils/pr25662
diff --git
a/bfd/tekhex.c
b/bfd/tekhex.c
index c2834b32d0cdbcd4062e20e1ff32711b4ab63726..0001457c743a943b8fcc6db32029283d878baecb 100644
(file)
--- a/
bfd/tekhex.c
+++ b/
bfd/tekhex.c
@@
-525,7
+525,7
@@
pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *))
/* Find first '%'. */
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);
if (is_eof)