[Bug 26389] Win3.1 Notepad crashes when opening a large file

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 20 10:56:10 CST 2011


Bruno Jesus <00cpxxx at gmail.com> changed:

           What    |Removed                     |Added
  Attachment #37537|0                           |1
        is obsolete|                            |

--- Comment #5 from André H. <nerv at dawncrow.de> 2011-11-20 06:25:34 CST ---
(In reply to comment #3)
> Created attachment 37537 [details]
> crash in 1.3.33
> Still present in 1.3.33. The backtrace seems to be helpful.

seems to me like EDIT_EM_SetHandle calling get_text_length which calls and
crashes in strlenW
could you pls debug this further by adding some TRACEs or ERRs in that

--- Comment #6 from Bruno Jesus <00cpxxx at gmail.com> 2011-11-20 10:56:10 CST ---
Created attachment 37552
  --> http://bugs.winehq.org/attachment.cgi?id=37552
+user32 -O0

After recompiling with -O0 I reached the crash point. The function
get_text_length (edit.c:258) is called with a NULL es->text parameter making
strlenW crash. Better backtrace attached.

The "hide the bug" solution works very well and makes wine behave correctly:

 static inline UINT get_text_length(EDITSTATE *es)
-    if(es->text_length == (UINT)-1)
+    if(!es->text)
+        es->text_length = 0;
+    else if(es->text_length == (UINT)-1)
         es->text_length = strlenW(es->text);
     return es->text_length;

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list