]> granicus.if.org Git - llvm/commit
[llvm-ar] Fix support for archives with members larger than 4GB
authorOwen Reynolds <gbreynoo@gmail.com>
Tue, 23 Jul 2019 14:44:21 +0000 (14:44 +0000)
committerOwen Reynolds <gbreynoo@gmail.com>
Tue, 23 Jul 2019 14:44:21 +0000 (14:44 +0000)
commite52e5ed5a4cddc64c106dc03a13b07ac904b8fca
treee53a9c9e26abc174c5a817438ad55438770bb59c
parent637792241892004f948713d07e60656e93fa672e
[llvm-ar] Fix support for archives with members larger than 4GB

llvm-ar outputs a strange error message when handling archives with
members larger than 4GB due to not checking file size when passing the
value as an unsigned 32 bit integer. This overflow issue caused
malformed archives to be created.:

https://bugs.llvm.org/show_bug.cgi?id=38058

This change allows for members above 4GB and will error in a case that
is over the formats size limit, a 10 digit decimal integer.

Differential Revision: https://reviews.llvm.org/D65093

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366813 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/Archive.h
lib/Object/Archive.cpp
lib/Object/ArchiveWriter.cpp