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

 
 

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

Submitter:  Jon Wadelton <jonwad>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.14-f13d.
    Corresponding source code