Eric Pouech pouech-eric@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).