GetModuleFileName

Alexandre Julliard julliard at winehq.org
Sun Apr 18 14:19:09 CDT 2004


Eric Pouech <pouech-eric at wanadoo.fr> writes:

> Interestingly enough, GetModuleFileName[AW] doesn't '\0'-terminate the
> buffer if it is too small
> Our current implementation was terminating the buffer.
> This patch fixes this, and adds a test case for that behavior and
> patches all the places in wine which are potentially impacted by it

I doubt it fills the buffer with nulls if it is too large though, so
strncpy is probably not the right thing to use here (in fact strncpy
is almost always the wrong function to use, we should probably have a
janitorial task to fix this everywhere).

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list