bugOpenEXR - Bugs: bug #15760, frame buffer offset bug

 
 

bug #15760: frame buffer offset bug

Submitted by:  None
Submitted on:  Wed 15 Feb 2006 08:22:52 PM UTC  
 
Category: IlmImfSeverity: 3 - Normal
Item Group: NoneStatus: Need Info
Privacy: PublicAssigned to: Florian Kainz <fkainz>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 31 Mar 2006 10:48:56 PM UTC, comment #1:

Is this problem real? Passing a null pointer to setFrameBuffer()
should be fine. In the case described here, pixels[0][0] is never
accessed. If the pixel at location (dw.min.x, dw.min.y) happens
to be at address dw.min.x+dw.min.y*width, then the frame buffer's
base pointer is 0. However, before accessing the pixel, the base
pointer is offset by dw.min.x+dw.min.y*width bytes, which results
in the correct address for the pixel.

Since I don't have an e-mail address to write to for more
information (OS, compiler, etc.), I will close this bug for now.

Florian Kainz <fkainz>
Project MemberIn charge of this item.
Wed 15 Feb 2006 08:22:52 PM UTC, original submission:

When using the OpenEXR reader with the recommended method for calling setFrameBuffer can result in a null point being passed. This will result in read failure and a thrown exception.

For example, from the OpenEXR docs:

pixels.resizeErase (height, width);
file.setFrameBuffer (&pixels[0][0] - dw.min.x - dw.min.y * width, 1, width);

If the address of pixels[0][0] happens to equal dw.min.x + dw.min.y * width, then 0 will get passed into the buffer address for setFrameBuffer.

I was able to work around this problem by checking for the 0 case before calling setFrameBuffer and calling resizeErase again to reallocate the buffer with a different address.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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
Fri 31 Mar 2006 10:48:56 PM UTCfkainzStatusNone=>Need Info
  Assigned toNone=>fkainz
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1