summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorSean Silva <silvas@purdue.edu>2013-06-08 04:32:59 +0000
committerSean Silva <silvas@purdue.edu>2013-06-08 04:32:59 +0000
commit4bf5c4b7460ca7e663d0ae8f3011a019812544b3 (patch)
tree2d7da1159aa5ff683e0730c386b692033e8c58d3 /llvm/lib/Object/Binary.cpp
parenteb0cc96e4b0a1d6f36a00d92b82dc58a97f4bcd2 (diff)
downloadbcm5719-llvm-4bf5c4b7460ca7e663d0ae8f3011a019812544b3.tar.gz
bcm5719-llvm-4bf5c4b7460ca7e663d0ae8f3011a019812544b3.zip
Don't artifically restrict input object size.
sys::IdentifyFileType is already conscious of the length, and object_error::invalid_file_type is returned below anyway if sys::IdentifyFileType doesn't recognize the file. llvm-svn: 183605
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
-rw-r--r--llvm/lib/Object/Binary.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp
index 4e528d8ea56..012e3284127 100644
--- a/llvm/lib/Object/Binary.cpp
+++ b/llvm/lib/Object/Binary.cpp
@@ -45,8 +45,6 @@ error_code object::createBinary(MemoryBuffer *Source,
OwningPtr<MemoryBuffer> scopedSource(Source);
if (!Source)
return make_error_code(errc::invalid_argument);
- if (Source->getBufferSize() < 64)
- return object_error::invalid_file_type;
sys::LLVMFileType type = sys::IdentifyFileType(Source->getBufferStart(),
static_cast<unsigned>(Source->getBufferSize()));
error_code ec;
OpenPOWER on IntegriCloud