gdi32 (1/2): fix unchecked NULL ptr in BIDI_Reorder

Alexander Dorofeyev alexd14 at hushmail.com
Sun Oct 21 13:50:34 CDT 2007


2nd try, split in two patches and removed c++ comment.

Michael Stefaniuc wrote:
  > Hello Alexander!
  >
  > Alexander Dorofeyev wrote:
  >> This patch fixes two problems that are causing crashes in
  > Thanks for the patch. Could you please split the patch in two; one patch
  > for each problem fixed. Please also do not use C++ style comments aka //
  >
  >> 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 |   31 +++++++++++++++++++++++++++----
    1 files changed, 27 insertions(+), 4 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: d81c7e0d327d2f4dcd022a1a88d9ac0100e079a5.diff
Type: text/x-patch
Size: 2210 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071021/16f63363/attachment-0001.bin 


More information about the wine-patches mailing list