The call to NormalizePathname() overwrites its string
parameter with its result. In focusWindowMS(), in
macro.c, the string passed in is a string attached to a
macro data value. Now if NormalizePathname() attempts
to extend the string (which can happen quite easily for
a passed buffer name like "Untitled"), the string heap
becomes corrupt. The result is a crash in the garbage
To correct this bug, provide a big (presumably
MAXPATHLEN will be enough) buffer as
NormalizePathname()'s parameter, and copy the passed
string's value into that. Now you can call
NormalizePathname() without (too much) worry.
Log in to post a comment.