Oleksij Rempel bug-track@fisher-privat.net writes:
@@ -3961,6 +3962,8 @@ static int INT21_FindNext( CONTEXT *context ) INT21_FindPath = dta->fullPath = NULL; } dta->count = n;
p = dta->filename;
for ( ; *p; p++) *p = toupper(*p);
Using toupper is probably not a good idea on OEM codepage strings. Which app depends on this?
Am 30.05.2012 13:32, schrieb Alexandre Julliard:
Oleksij Rempel bug-track@fisher-privat.net writes:
@@ -3961,6 +3962,8 @@ static int INT21_FindNext( CONTEXT *context ) INT21_FindPath = dta->fullPath = NULL; } dta->count = n;
p = dta->filename;
for ( ; *p; p++) *p = toupper(*p);
Using toupper is probably not a good idea on OEM codepage strings. Which app depends on this?
Probably none. I created this patch by hunting this get_media_id bug. I even created small windows program calling findfirst/findnext to compare the output produced by windows and wine.
I just reverted this patch and tested with the program i was working on and it still works. So no need to apply this patch.
On Wed, May 30, 2012 at 01:32:28PM +0200, Alexandre Julliard wrote:
Oleksij Rempel bug-track@fisher-privat.net writes:
@@ -3961,6 +3962,8 @@ static int INT21_FindNext( CONTEXT *context ) INT21_FindPath = dta->fullPath = NULL; } dta->count = n;
p = dta->filename;
for ( ; *p; p++) *p = toupper(*p);
Using toupper is probably not a good idea on OEM codepage strings. Which app depends on this?
I'd also guess that 'p' is defined as 'char *'. The domain of toupper() isn't char, the value must be cast to 'unsigned char' (or the pointer to 'unsigned char *').
David
Am 30.05.2012 23:06, schrieb David Laight:
On Wed, May 30, 2012 at 01:32:28PM +0200, Alexandre Julliard wrote:
Oleksij Rempel bug-track@fisher-privat.net writes:
@@ -3961,6 +3962,8 @@ static int INT21_FindNext( CONTEXT *context ) INT21_FindPath = dta->fullPath = NULL; } dta->count = n;
p = dta->filename;
for ( ; *p; p++) *p = toupper(*p);
Using toupper is probably not a good idea on OEM codepage strings. Which app depends on this?
I'd also guess that 'p' is defined as 'char *'. The domain of toupper() isn't char, the value must be cast to 'unsigned char' (or the pointer to 'unsigned char *').
David
it is true, i used "char *". I just copy pasted this part from "Convert ASCIIZ string to uppercase" in int21.c So probably this should be fixed too.
Or there is any way no interest to apply current patch?
Oleksij Rempel bug-track@fisher-privat.net writes:
it is true, i used "char *". I just copy pasted this part from "Convert ASCIIZ string to uppercase" in int21.c So probably this should be fixed too.
Or there is any way no interest to apply current patch?
Only if you can show an application that depends on this. Otherwise there's no reason to change anything.