farbrausch/fr_public — pull request #16 by png85 (2012-04-25 16:27:57+00:00)
Title: memleak on realloc() fault in DataBuffer::Append()

The method DataBuffer::Append() in dis.cpp contains another possible memory-related problem:

When the realloc() call there fails the memory pointed to by 'Data' before the call is lost and additionally 'Data' is overwritten with a NULL pointer which will lead to a crash at the sCopyMem() call later on in the code.

I've added a check for the return value of realloc() which will clean up the previously leaked memory and break via an sVERIFY() call in case the realloc fails.