msvcrt: Fix buffer overflow in _get_tzname.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46481 Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
358fb2f4d8
commit
79188582f0
|
@ -939,6 +939,11 @@ int CDECL MSVCRT__get_tzname(MSVCRT_size_t *ret, char *buf, MSVCRT_size_t bufsiz
|
|||
*ret = strlen(timezone)+1;
|
||||
if(!buf && !bufsize)
|
||||
return 0;
|
||||
if(*ret > bufsize)
|
||||
{
|
||||
buf[0] = 0;
|
||||
return MSVCRT_ERANGE;
|
||||
}
|
||||
|
||||
strcpy(buf, timezone);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue