bugpng++, a C++ wrapper for libpng - Bugs: bug #35760, Infinite recursion in non-template...

 
 

bug #35760: Infinite recursion in non-template function png::image::write_stream(std::ostream&)

Submitted by:  None
Submitted on:  Thu 08 Mar 2012 02:12:49 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 29 Mar 2012 02:56:08 PM UTC, comment #1:

Indeed. Fixed in trunk, r123.

Thank you for pointing out the problem.

Alexander Shulgin <alexshulgin>
Project Administrator
Thu 08 Mar 2012 02:12:49 PM UTC, original submission:

In image.hpp, line 268, png++ v0.2.5, the non-template function png::image::write_stream(std::ostream&) calls itself and therefore causes infinite recursion (and eventual stack overflow). Relevant code included below:

This may be fixed by removing the non-template version of write_stream, leaving its following, template version only. I've made the fix to my own copy of png++ and it seems to do the job.

Diff file attached.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #25293:  image.hpp.diff added by None (202B - text/x-patch - Diff including potential fix for png::image::write_stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by alexshulgin (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 29 Mar 2012 02:56:08 PM UTCalexshulginStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 08 Mar 2012 02:12:49 PM UTCNoneAttached File-=>Added image.hpp.diff, #25293

    Back to the top


    Powered by Savane 3.1-cleanup1