aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-libmain.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-01-21 22:58:04 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-01-21 22:58:04 +0000
commita9647bf912b9d2eeb9297bb96d5274eb8c9ed75c (patch)
tree805b10a222dd770260a63a4af45cdde56018196b /libgo/runtime/go-libmain.c
parent44f4e4182bb7954a117781e7f4f658af69dec3fd (diff)
downloadgcc-a9647bf912b9d2eeb9297bb96d5274eb8c9ed75c.zip
gcc-a9647bf912b9d2eeb9297bb96d5274eb8c9ed75c.tar.gz
gcc-a9647bf912b9d2eeb9297bb96d5274eb8c9ed75c.tar.bz2
compiler: stop iterator on error
If there is an error reading or parsing an archive header, the Archive_iterator code would return a dummy header but would not mark itself as done. The effect is that an invalid archive leads to an endless loop reading and re-reading the same archive header. Avoid that by setting the offset to the end of the file, which will cause the iterator to == archive_end. No test since it doesn't seem worth constructing an invalid archive. Reviewed-on: https://go-review.googlesource.com/c/158217 From-SVN: r268129
Diffstat (limited to 'libgo/runtime/go-libmain.c')
0 files changed, 0 insertions, 0 deletions