mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
We got passed a NULL Dialect ptr and accessed it unprotected.
This commit is contained in:
parent
cb28bdc2c8
commit
a538888e11
1 changed files with 4 additions and 1 deletions
|
@ -349,6 +349,9 @@ int MAIN_GetLanguageID(LPCSTR Lang,LPCSTR Country,LPCSTR Charset,LPCSTR Dialect)
|
|||
for (i=0;i<j;i++)
|
||||
dialect[i]=tolower(Dialect[i]);
|
||||
dialect[i]='\0';
|
||||
} else {
|
||||
dialect = malloc(1);
|
||||
dialect[0] = '\0';
|
||||
}
|
||||
|
||||
#define LANG_ENTRY_BEGIN(x,y) if(!strcmp(lang, x )) { \
|
||||
|
@ -650,7 +653,7 @@ int MAIN_GetLanguageID(LPCSTR Lang,LPCSTR Country,LPCSTR Charset,LPCSTR Dialect)
|
|||
|
||||
end_MAIN_GetLanguageID:
|
||||
if (Charset) free(charset);
|
||||
if (Dialect) free(dialect);
|
||||
free(dialect);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue