mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
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
This commit is contained in:
parent
1374d6f849
commit
deedb4d87b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user