Hi,
taking another approach at Bug 19070, I noticed that dlls/hhctrl.ocx/hhctrl.c has even more problems with commandline-handling. All three invocations of strchr() should better be strchrnul(). (Compare calling hh.exe with '-mapid' and '-mapid ' to see one difference). strchrnul ist protected by _GNU_SOURCE, though. Because I could imagine there are more places throughout the source needing a fix like this, I think about importing strchrnul() directly from gnulib into libs/wine/string.c (most appropriate place I could find). The function is LGPLv2+, of course. Objections?
Regards,
Wolfram
Wolfram Sang wolfram@the-dreams.de writes:
taking another approach at Bug 19070, I noticed that dlls/hhctrl.ocx/hhctrl.c has even more problems with commandline-handling. All three invocations of strchr() should better be strchrnul(). (Compare calling hh.exe with '-mapid' and '-mapid ' to see one difference). strchrnul ist protected by _GNU_SOURCE, though. Because I could imagine there are more places throughout the source needing a fix like this, I think about importing strchrnul() directly from gnulib into libs/wine/string.c (most appropriate place I could find). The function is LGPLv2+, of course. Objections?
You'd have to make a more convincing case that it's really needed a lot. For hhctrl the command line parsing could be done much better, without requiring strchrnul.