On Wed, 2005-03-16 at 18:54, Ann and Jason Edmeades wrote:
Nice bug:
WCHAR *p = ALLOC_N_OBJ(WCHAR, nLen+1); #define ALLOC_N_OBJ(type, count) (type *)HeapAlloc(me_heap, 0, count*sizeof(type))
becomes (WCHAR *)HeapAlloc(me_heap, 0, nLen+1*sizeof(WCHAR))
and by precedence rules means we allocate just nLen + 2 bytes rather than 2
- (nLen+1)
Changelog
Correct memory allocation routine
Krzysztof - Does this solve the issue in the comment below it, ie the memory overrun?
Jason
Hi,
this one also fixes a bug with riched20 when trying to install DVD Shrink 3.2.0.15.
Thanks,
Paul.