FLTK logo

STR #924

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 | Roadmap 1.1 | SVN ⇄ GIT ]

STR #924

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary: fl_push_matrix() is not safe
Version:1.1-current
Created By:oksid
Assigned To:matt
Fix Version:1.1-current (SVN: v4417)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 oksid
07:10 Jun 28, 2005
fl_vertex.cxx.patch
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 oksid
07:10 Jun 28, 2005
fl_push_matrix() and fl_pop_matrix() are not safe due to the use of a static array.
The attached fl_vertex.cxx patch solves the problem by using dynamic array.
 
 
#2 mike
08:45 Jun 28, 2005
I think I'd rather just increase the size of the stack to 32 and check for overflow and underflow, spitting out an error via Fl::error() when the matrix stack goes out-of-bounds.

Otherwise we risk having a buggy program using up all available memory by not popping all of the matrices they push...
 
 
#3 matt
07:31 Jul 14, 2005
Added code according to Mike's suggestion. Stack depth is now 32.  
     

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'.