gdi32: fix unchecked NULL ptr and off by one error in BIDI_Reorder

Alexander Dorofeyev alexd14 at hushmail.com
Sun Oct 21 01:53:16 CDT 2007


Hello. This patch fixes two problems that are causing crashes in BIDI_Reorder. In 
particular, Skype 3.5.0 crashed every time I type anything in the chat edit box.

One problem is that it wasn't assured lpOutString isn't NULL, and NULL was 
getting passed to this routine by GetCharacterPlacementW. so it was crashing in 
memcpy. This patch creates a temporary buffer when lpOutString is NULL and it is 
used for in-place modifications instead in such case.

Another is off by one error in setting lpOrder.

---
  dlls/gdi32/bidi.c |   33 ++++++++++++++++++++++++++++-----
  1 files changed, 28 insertions(+), 5 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e20288344394087da9cc707d7684711184e4370a.diff
Type: text/x-patch
Size: 2514 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071020/3a25a307/attachment.bin 


More information about the wine-patches mailing list