Date: Tue, 21 Feb 2006 12:12:22 +0900 From: Alexander Nedotsukov <bland@FreeBSD.org> To: Joe Marcus Clarke <marcus@marcuscom.com> Cc: gnome@FreeBSD.org Subject: Re: Eog Crash while opening jpeg-images with EXIF data Message-ID: <43FA8516.5020404@FreeBSD.org> In-Reply-To: <1140490429.65763.3.camel@shumai.marcuscom.com> References: <1140487656.847.6.camel@synergy.odyssey.homeunix.org> <43FA7D9F.5090108@FreeBSD.org> <1140490429.65763.3.camel@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe Marcus Clarke wrote: > On Tue, 2006-02-21 at 11:40 +0900, Alexander Nedotsukov wrote: > >> Pascal, >> Cast it to (char*) instead. And this is not the only place in that file. >> You have to patch other memcpy()s too. >> > > I think guchar * would be more apt, no? > Well, technically there will be no difference at all. But aesthetically... could be. I preferred plain C char* in hope that it make clear to all that all we need is a byte pointer while guchar* needs a bit more knowledge from accident code reader (let's say s/he must be sure that guchar is not stands for GNU Unicode char which may be more that one byte in size) Nits... :-) > Joe > > >> All the best, >> Alexander. >> Pascal Hofstee wrote: >> >>> i am noticing a consistent eog crash when opening jpeg images with EXIF >>> data (using MC-gnome, eog-2.13.91) on FreeBSD/amd64 7.0-CURRENT >>> >>> The line that causes the crash is libeog/eog-metadata-reader.c:231 >>> >>> memcpy ((void*) ((int)(priv->exif_chunk) + priv->bytes_read), >>> (void*)&buf[i], priv->size); >>> >>> I am about 99% sure the (int) typecast on priv->exit_chunk is truncating >>> the 64-bit pointer into 32-bits causing the application to segfault as a >>> result. I am not 100% on how to properly fix this. >>> >>> If any of you could have a look at this, that would be appreciated. >>> >>> >>> >> _______________________________________________ >> freebsd-gnome@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-gnome >> To unsubscribe, send any mail to "freebsd-gnome-unsubscribe@freebsd.org" >> >>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43FA8516.5020404>