• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisionde25939739ffe9a9ad7cec07a35bb2a1e430fe39 (tree)
l'heure2017-08-18 16:45:12
AuteurNick Clifton <nickc@redh...>
CommiterNick Clifton

Message de Log

Fix buffer overrun parsing a corrupt tekhex binary.

PR binutils/21962
* tekhex.c (getsym): Fix check for source pointer walking off the
end of the input buffer.

Change Summary

Modification

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
1+2017-08-18 Nick Clifton <nickc@redhat.com>
2+
3+ PR binutils/21962
4+ * tekhex.c (getsym): Fix check for source pointer walking off the
5+ end of the input buffer.
6+
17 2017-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
28
39 PR ld/18808
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -307,7 +307,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp)
307307 len = hex_value (*src++);
308308 if (len == 0)
309309 len = 16;
310- for (i = 0; i < len && src < endp; i++)
310+ for (i = 0; i < len && (src + i) < endp; i++)
311311 dstp[i] = src[i];
312312 dstp[i] = 0;
313313 *srcp = src + i;