bugOpenEXR - Bugs: bug #21551, InputFile::setFrameBuffer fails...

 
 

bug #21551: InputFile::setFrameBuffer fails because of invalid iterator when requesting different channels

Submitted by:  Jon Wadelton <jonwad>
Submitted on:  Fri 09 Nov 2007 04:39:37 PM UTC  
 
Category:  IlmImf Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 09 Nov 2007 04:39:37 PM UTC, original submission:

InputFile::setFrameBuffer seems to fail because the code is trying to dereference an iterator over it's bounds.

This only happens if a previous setFrameBuffer call contained more channels than the current call.

-- in setFrameBuffer line 421 --
const FrameBuffer &oldFrameBuffer = _data->tFileBuffer;

FrameBuffer::ConstIterator i = oldFrameBuffer.begin();
FrameBuffer::ConstIterator j = frameBuffer.begin();

while (i != oldFrameBuffer.end())
{
if (strcmp (i.name(), j.name()) || i.slice().type != j.slice().type) // if frameBuffer size < oldFrameBuffer size then j maybe invalid
break;
++i;
++j;
}
-- end code --

This code is in OpenEXR 1.4 and 1.6

A patch is attached.

Jon Wadelton <jonwad>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #14351:  setFrameBuffer.diff added by jonwad (438B - application/octet-stream - Patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jonwad (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-09 jonwad Attached File- => Added setFrameBuffer.diff, #14351

    Back to the top


    Powered by Savane 3.3