winex11.drv: Fix buffer overflow bug in X11DRV_KeyEvent() andX11DRV_ToUnicodeEx()
Dmitry Timoshkov
dmitry at codeweavers.com
Sat Aug 23 23:49:48 CDT 2008
"Muneyuki Noguchi" <nogu.dev at gmail.com> wrote:
> winex11.drv: Fix buffer overflow bug in X11DRV_KeyEvent() and
> X11DRV_ToUnicodeEx()
> + Str = (char *)malloc(64);
> + if (Str == NULL)
> + ERR("Failed to allocate memory!\n");
Please don't use malloc() in Wine, use win32 Heap*** APIs instead.
Also, you need to properly handle memory allocation errors, not just
print an ERR.
--
Dmitry.
More information about the wine-devel
mailing list