From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5171370AFD for ; Mon, 8 Jun 2026 13:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780926819; cv=none; b=kvNFHmeu7xu1uaxpORtHY+PUVkRrnABgPNqwREZrMBwfPbwvChnUCKzsHsYj4YeqXtMA8+B2ASdKGjRG0gJZmQ884/qD370WDd8ZV93ihgXljfNTTCFyfemGEBNauiwN1Ej0X+hLQL2wuVXvVDeLSNNt0GE7TjQcRb/FDffGN4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780926819; c=relaxed/simple; bh=p0Y3B5AjQCPp2bTdH8S1aWUdl2RbraMn6S5QL0I2lP8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J1LMPW8TzdzJHANUsfZKpGEUIv6UHNX3xp6m8p9lhO4TLLLfvukdNgtz1yEdFPKiO6UbHhf7TyKv4wGkI04T+Ct5Rh5zCkhsWOtHAh78fpsCG5UWuCfqB1+PZDj0URrvo1x+zlO+02ZnldsKzLfLb85LeQtGTpvrU99Ae6W9SlI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=oLmas4/y; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=af5LAe5x; arc=none smtp.client-ip=103.168.172.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="oLmas4/y"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="af5LAe5x" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id F160514001C2; Mon, 8 Jun 2026 09:53:37 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 08 Jun 2026 09:53:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1780926817; x=1781013217; bh=EBC1YKVPZ4 fPNpMEGTykG6hD9g0tZUfl7ahyCBvOhqE=; b=oLmas4/yNHcGJeeBo5ePDWU+k8 x7frJpzSrbfhcgfcdAgzJ1b1Ch7VI7LNYUMqx3fi0O+6XNKrceACVS/nJdvMDGNk uxKSIscuRWzh1lU/kmlyeBO4IN/VZF6l+J5HFRkBYjTVROHKs5ZORLRK6oShemNc E2Sgq/FZnQZmTdj8qhAqarFguftq0CP7oyOEGl45c8rh8IOf0tKYJVzGQKoi4YSq jAXRxXUWFilRD2km9uqsAgECXUyqp7EIsNN6NcOkQH2lmBTB+81TBBPj0IKSC/RQ It/ahbv9WqNkqVK64aDTTyGg7LplLqDheJxwRiVxxO4phPZNvsvVZSlsClew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1780926817; x=1781013217; bh=EBC1YKVPZ4fPNpMEG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VUKWq0vq/a3S8MEKqTQb/0kl+qB8/xYSKQ X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 09:53:37 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id a27b7323 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Jun 2026 13:53:34 +0000 (UTC) Date: Mon, 8 Jun 2026 15:53:31 +0200 From: Patrick Steinhardt To: Johannes Schindelin via GitGitGadget Cc: git@vger.kernel.org, Kristofer Karlsson , Johannes Schindelin Subject: Re: [PATCH 4/7] packfile: widen unpack_entry()'s size out-parameter to size_t Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 04, 2026 at 10:51:09AM +0000, Johannes Schindelin via GitGitGadget wrote: > diff --git a/builtin/fast-import.c b/builtin/fast-import.c > index 82bc6dcc00..3dff898c43 100644 > --- a/builtin/fast-import.c > +++ b/builtin/fast-import.c > @@ -1239,6 +1239,8 @@ static void *gfi_unpack_entry( > unsigned long *sizep) > { > enum object_type type; > + size_t size_st = 0; > + void *data; > struct packed_git *p = all_packs[oe->pack_id]; > if (p == pack_data && p->pack_size < (pack_size + the_hash_algo->rawsz)) { > /* The object is stored in the packfile we are writing to > @@ -1260,7 +1262,10 @@ static void *gfi_unpack_entry( > */ > p->pack_size = pack_size + the_hash_algo->rawsz; > } > - return unpack_entry(the_repository, p, oe->idx.offset, &type, sizep); > + data = unpack_entry(the_repository, p, oe->idx.offset, &type, &size_st); > + if (sizep) > + *sizep = cast_size_t_to_ulong(size_st); > + return data; > } Nit, please feel free to ignore: do we want to add a NEEDSWORK comment here? Patrick