From: Keir Fraser Subject: Re: [PATCH] xc_inflate_buffer fix Date: Fri, 17 Mar 2006 10:38:09 +0000 Message-ID: <9ff88d1055d02ecdcfd193cd37200d05@cl.cam.ac.uk> References: <44185567.6070805@virtualiron.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <44185567.6070805@virtualiron.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Lively Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 15 Mar 2006, at 17:56, David Lively wrote: > I notice some of my initrds are failing to gunzip: > ERROR: inflate failed, sts -5 > These same initrds work fine with Ben Thomas' original > patch introducing xc_{linux,hvm}_build_mem. The checked-in > version changed some declarations from unsigned char * to > char *, breaking the output length computation in xc_inflate_buffer. > This patch assumes you want to keep using the signed char * > for the interface, so it simply inserts a few casts to unsigned. > Tested lightly, but the bug is pretty obvious once you notice > the signedness change ... Yep, my bad. Thanks. -- Keir