[WebAssembly] Object: Add more error checking for object file reading
authorSam Clegg <sbc@chromium.org>
Fri, 18 May 2018 21:08:26 +0000 (21:08 +0000)
committerSam Clegg <sbc@chromium.org>
Fri, 18 May 2018 21:08:26 +0000 (21:08 +0000)
commit4bbc6b55e7bc13b04eb7e47f6cc6df17e508a270
treee5958958ce237869ef7b58f432fd448ce8c82079
parent0ca8c0895c6034615593c295dd955f29b25bf3d4
[WebAssembly] Object: Add more error checking for object file reading

This should address some the assert failures the fuzzer has been
finding such as:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6719

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

llvm-svn: 332769
llvm/lib/Object/WasmObjectFile.cpp