summaryrefslogtreecommitdiff
path: root/lib/Object
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
commitdbfb960e74cc37e7a066f7fbcf78e6936a9e7794 (patch)
tree116aef2565182febd56eef50fc4f0477978d33b6 /lib/Object
parent2c69e900644535d58292756c0a114c88ce51824c (diff)
downloadllvm-dbfb960e74cc37e7a066f7fbcf78e6936a9e7794.tar.gz
llvm-dbfb960e74cc37e7a066f7fbcf78e6936a9e7794.tar.bz2
llvm-dbfb960e74cc37e7a066f7fbcf78e6936a9e7794.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/Binary.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/Object/Binary.cpp b/lib/Object/Binary.cpp
index 4e528d8ea5..012e328412 100644
--- a/lib/Object/Binary.cpp
+++ b/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;