Tighten some of the name map checks further
llvm-svn: 271130
This commit is contained in:
parent
bcc47419d9
commit
328b6d3903
|
@ -50,7 +50,11 @@ Error NameMap::load(codeview::StreamReader &Stream) {
|
|||
make_error<RawError>(raw_error_code::corrupt_file,
|
||||
"Expected name map max strings"));
|
||||
|
||||
const uint32_t MaxNumberOfWords = UINT32_MAX / sizeof(uint32_t);
|
||||
if (MaxNumberOfStrings > (UINT32_MAX / sizeof(uint32_t)))
|
||||
return make_error<RawError>(raw_error_code::corrupt_file,
|
||||
"Implausible number of strings");
|
||||
|
||||
const uint32_t MaxNumberOfWords = UINT32_MAX / (sizeof(uint32_t) * 8);
|
||||
|
||||
// This appears to be a hash table which uses bitfields to determine whether
|
||||
// or not a bucket is 'present'.
|
||||
|
|
Loading…
Reference in New Issue