]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Proper bound check in _bfd_doprnt_scan
authorAlan Modra <amodra@gmail.com>
Sun, 5 Nov 2017 09:22:13 +0000 (19:52 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 5 Nov 2017 11:31:56 +0000 (22:01 +1030)
commitd6b67f5774b1f320ee1e6f26e47c49ace651d0a7
tree2aac9b2ceed44f497d14f18edba8be9963d0fb97
parent3f0c3363d614793edcf27ec21bf54f287a9f1117
Proper bound check in _bfd_doprnt_scan

While an abort after storing out of bounds by one to an array in our
caller is probably OK in practice, it's better to check before storing.

PR 22397
* bfd.c (_bfd_doprnt_scan): Check args index before storing, not
after.

(cherry picked from commit 26a9301057457ae576b51b8127bb805b4e484a6b)
bfd/ChangeLog
bfd/bfd.c