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: IlmImfSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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
-- 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 File(s):

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
  • -unavailable- added by jonwad (Submitted the item)

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



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 09 Nov 2007 04:39:37 PM UTCjonwadAttached File-=>Added setFrameBuffer.diff, #14351

    Back to the top

    Powered by Savane 3.1-cleanup1