ignore it on the assumption that the .pdb is corrupt, rather than
running the system out of memory by trying to allocate a chunk of that
size.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11226
UInt i;
if (!size) return NULL;
+ if (size > 512 * 1024 * 1024) {
+ VG_(umsg)("Warning: pdb_ds_read: implausible size "
+ "(%u); skipping -- possible invalid .pdb file?\n", size);
+ return NULL;
+ }
blocksize = pdb->u.ds.header->block_size;
nBlocks = (size + blocksize - 1) / blocksize;