FLTK logo

STR #3376

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 TRH
08:04 Apr 18, 2017
browser.cxx
1k
 
 
#2 TRH
08:04 Apr 18, 2017
Fl_Browser.patch
1k
 
 
#3 TRH
08:04 Apr 18, 2017
FLTK_1_4_win32.jpg
18k
 
 
#4 TRH
08:05 Apr 18, 2017
FLTK_1_4_linux32.jpg
18k
 
 
#5 TRH
08:05 Apr 18, 2017
FLTK_1_4_linux64.jpg
17k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 TRH
08:03 Apr 18, 2017
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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.