Was passing a NULL buffer (i.e. not initially HeapAlloced()) to a call which then called HeapReAlloc() on it. Result: not good. Example of erroneous behaviour: winedbg something and do "break MessageBoxA". Anything entered into the prompt as to which to choose will cause the debugger to crash.
Index: programs/winedbg/debug.l =================================================================== RCS file: /home/wine/wine/programs/winedbg/debug.l,v retrieving revision 1.6 diff -u -r1.6 debug.l --- programs/winedbg/debug.l 26 Nov 2003 04:10:08 -0000 1.6 +++ programs/winedbg/debug.l 28 Nov 2003 23:46:38 -0000 @@ -296,6 +296,12 @@ char* line = NULL; size_t len = 0; + /* first alloc of our current buffer */ + line = HeapAlloc(GetProcessHeap(), 0, len = 2); + assert(line); + line[0] = '\n'; + line[1] = '\0'; + DEBUG_FetchEntireLine(pfx, &line, &len, FALSE); len = strlen(line); /* remove trailing \n */