X-Git-Url: https://git.sesse.net/?p=freerainbowtables;a=blobdiff_plain;f=Client%20Applications%2Frcracki_mt%2FRTI2Reader.cpp;h=b1d5f968a4c0f27c227620cf5befe606fdafd984;hp=abd855076517797a322f22c81be219e749963112;hb=86bbf0fd5ba4e07d3279b4179fd8fc808198eaae;hpb=0fb676244827a448dc60118d6558c4a4e346ffee diff --git a/Client Applications/rcracki_mt/RTI2Reader.cpp b/Client Applications/rcracki_mt/RTI2Reader.cpp index abd8550..b1d5f96 100644 --- a/Client Applications/rcracki_mt/RTI2Reader.cpp +++ b/Client Applications/rcracki_mt/RTI2Reader.cpp @@ -48,7 +48,11 @@ RTI2Reader::RTI2Reader(string Filename) long len = GetFileLen(pFileIndex); fseek(pFileIndex, 0, SEEK_SET); - m_pIndex = new unsigned char[len]; + m_pIndex = new (nothrow) unsigned char[len]; + if(m_pIndex == NULL) { + printf("Error allocating %ld MB memory for index in RTI2Reader::RTI2Reader()", len / (1024 * 1024)); + exit(-2); + } if(fread(m_pIndex, 1, len, pFileIndex) != (unsigned long)len) { printf("Error while reading index file");