richedit: Prevented NULL value from being used to avoid a page fault.

Dylan Smith dylan.ah.smith at gmail.com
Wed Jun 25 10:33:06 CDT 2008


A page fault occurs from doing the following:
1. Type enter twice following by a character (e.g. '1')
2. Select all (Ctrl+A)
3. Copy text (Ctrl+C)
4. Paste text (Ctrl+V)
5. Move cursor to the right (Arrow Left)

This occurs the paragraphs stored for the last selection change to the
first paragraph when the text is deleted during the text deletion
portion of the paste operation, but then the character offsets for the
last selection cause the paragraphs to be invalidated from the end of
the current selection (3rd paragraph) until the paragraph after the end
of the previous selection (2nd paragraph).  The delimiting paragraph
will therefore not be found, and a NULL value will be used without
checking for it.

The safest approach is to just check for NULL to avoid this problem
re-occuring.
---
 dlls/riched20/para.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-richedit-Prevented-NULL-value-from-being-used-to-avo.diff
Type: text/x-diff
Size: 499 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080625/9ad1df3e/attachment.diff 


More information about the wine-patches mailing list