| [ Return to Bugs & Features | SVN ⇄ GIT ]
STR #3376
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 2 - Specific to an operating system |
Subsystem: | Core Library |
Summary: | Fl_Browser::item_draw() long integer overflow in strtol() on 32-bit platforms. |
Version: | 1.4.0 |
Created By: | TRH |
Assigned To: | AlbrechtS |
Fix Version: | 1.4.0 (SVN: v12252) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
| The Fl_Browser widget has an issue with some colors encoded in the format-string. If you want to use violet (Fl_Color)0xFF00FF00 (decimal 4278255360) as background color you end up with cyan instead (see attached screenshots). This behavior is reproducible on 32-bit Linux and Windows with FLTK-1.3.4 and FLTK-1.4.x-r12219. Everything works fine on 64-bit Linux. The Fl_Browser widget calls strtol() to parse fore- and background-colors. Since the size of long is 4 bytes on 32-bit Linux and Windows the result is an overflow.
Attachments: Fl_Browser.patch – A possible solution for this STR. browser.cxx – A reproducer. Can be compiled with fltk-config --compile *.jpg – The result of the reproducer on given platforms. | |
|
#2 | AlbrechtS 07:42 Jun 04, 2017 |
| Fixed in Subversion repository.
Thanks for the report and the patch. Patch applied in svn r12252. | |
|
#3 | AlbrechtS 09:59 Jul 18, 2017 |
| Fixed in FLTK 1.3.5 svn as well (svn r 12334). | |
[ Return to Bugs & Features ]
|
| |