openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] Crash when reading sample images


From: Ronny Spiegel
Subject: Re: [Openexr-devel] Crash when reading sample images
Date: Mon, 15 Nov 2010 14:17:13 +0100

Hi,

thanks for your patch :) I already git a similar patch by Jonathan which was not sent to the list (sorry, did not see that).

Thank you very much for pointing me to the error.

Thx,

RSp

On Tue, Nov 9, 2010 at 8:34 PM, Brendan Bolles <address@hidden> wrote:
On Oct 22, 2010, at 4:21 AM, Ronny Spiegel wrote:

>               char *tmpBuf = new char[width * height * getPixelSize(channel.channel().type) * 2];
>               buffers.push_back(tmpBuf);
>
>               // calculate the address of pixel (0,0)
>               char *base = tmpBuf + (getPixelSize(channel.channel().type) * (sz.min.x - sz.min.y * width));


I think your bug might be this (in patch form):

- char *base = tmpBuf + (getPixelSize(channel.channel().type) * (sz.min.x - sz.min.y * width));
+ char *base = tmpBuf + (getPixelSize(channel.channel().type) * (-sz.min.x - (sz.min.y * width));


Also, not sure why you have * 2 at the end of your memory allocation up there.


Brendan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]