From owner-freebsd-gnome@FreeBSD.ORG Tue Feb 21 02:40:35 2006 Return-Path: X-Original-To: gnome@freebsd.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A6FD16A420 for ; Tue, 21 Feb 2006 02:40:35 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from smtp1.jp.viruscheck.net (smtp1.jp.viruscheck.net [154.33.69.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C17A43D48 for ; Tue, 21 Feb 2006 02:40:34 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from scan2.jp.viruscheck.net ([154.33.69.37] helo=mail1.jp.viruscheck.net) by smtp1.jp.viruscheck.net with esmtp (Exim 3.36 #1) id 1FBNS5-0001FJ-00; Tue, 21 Feb 2006 11:40:33 +0900 Received: from [60.42.120.178] (helo=noc.orchid.orchidtechnology.com) by mail1.jp.viruscheck.net with esmtp (Exim 3.36 #3) id 1FBNS5-0005tf-00; Tue, 21 Feb 2006 11:40:33 +0900 Received: from [89.60.10.11] (horse.orchid.orchidtechnology.com [89.60.10.11]) by noc.orchid.orchidtechnology.com (8.13.4/8.13.4) with ESMTP id k1L2eWPt062107; Tue, 21 Feb 2006 11:40:32 +0900 (JST) (envelope-from bland@FreeBSD.org) Message-ID: <43FA7D9F.5090108@FreeBSD.org> Date: Tue, 21 Feb 2006 11:40:31 +0900 From: Alexander Nedotsukov User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Pascal Hofstee References: <1140487656.847.6.camel@synergy.odyssey.homeunix.org> In-Reply-To: <1140487656.847.6.camel@synergy.odyssey.homeunix.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gnome@FreeBSD.org Subject: Re: Eog Crash while opening jpeg-images with EXIF data X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 02:40:35 -0000 Pascal, Cast it to (char*) instead. And this is not the only place in that file. You have to patch other memcpy()s too. 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. > >