[Bug 38392] New: Divide by zero in dlls/user32/Edit.c source file
https://bugs.winehq.org/show_bug.cgi?id=38392 Bug ID: 38392 Summary: Divide by zero in dlls/user32/Edit.c source file Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs(a)winehq.org Reporter: bur_av(a)bk.ru Distribution: --- Upon calculation of line count in get_vertical_line_count function, line_height field might take value of 0, which results in division by zero error. E.g. I encountered this when dynamically creating hidden text control in Clarion language, which uses WinAPI call for that. Here's my hotfix for this bug (return 1 if es->line_height <= 0): {{{ static inline INT get_vertical_line_count(EDITSTATE *es) { if (es->line_height <=0) { return 1; } else { INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height; return max(1,vlc); } } }}} The problem shows up in WINE versions 1.4.1 - 1.7.40. (at least on CentOS 6, CentOS 7, Debian 7 and Mint 17). Please, fix this bug in official release. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38392 nallekarhu_80(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nallekarhu_80(a)luukku.com --- Comment #1 from nallekarhu_80(a)luukku.com --- Can you figure any test application for this? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38392 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |focht(a)gmx.net Version|unspecified |1.4.1 Resolution|--- |DUPLICATE Summary|Divide by zero in |Divide by zero in |dlls/user32/Edit.c source |dlls/user32/Edit.c source |file |file (encountered with | |Clarion TX Control wrapper) --- Comment #2 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, dupe of bug 19239 Also try to put at least the application name and version to reproduce with in the bug summary. Regards *** This bug has been marked as a duplicate of bug 19239 *** -- 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.
https://bugs.winehq.org/show_bug.cgi?id=38392 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Austin English <austinenglish(a)gmail.com> --- Closing. -- 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.
participants (1)
-
wine-bugs@winehq.org