Hello,
While working on a vbscript bug affects a real world app, I found a potential miss usage of strchr/strrch in Wine. Here is a unfiltered list:
$ git grep "= strchr" | grep ext | grep -E "'.'"
dlls/gdi32/freetype.c: ext = strchr( last_part, '.' ); dlls/msi/action.c: extension = strchrW( filename, '.' ); dlls/wineps.drv/type1afm.c: CHAR *file_extension = strchr(dent->d_name, '.'); tools/winebuild/utils.c: if (!(ext = strchr( basename, '.' ))) ext = prefix + strlen(prefix);
After basic reviewing, I think all the above codes are potential miss usage, but there is a risk to touch these codes. I don't know any real word app affected by these codes yet, so I have no strong motivation to touch them. Anyone worked on related fields has interesting to review deeper?
Thanks!
On Tue, Nov 12, 2013 at 4:19 PM, Qian Hong qhong@codeweavers.com wrote:
programs/wscript/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
On Wed, 2013-11-13 at 18:00 +0800, Qian Hong wrote:
While working on a vbscript bug affects a real world app, I found a potential miss usage of strchr/strrch in Wine. Here is a unfiltered list:
$ git grep "= strchr" | grep ext | grep -E "'.'"
...
dlls/msi/action.c: extension = strchrW( filename, '.' );
This should be strrchrW.