From: Derrick Stolee Date: Mon, 09 Nov 2026 13:36:02 GMT Subject: Re: [PATCH 14/15] bundle-uri: handle NULL values in bundle lists Message-ID: <79ac692c-4ae9-4b9a-860e-224accdea928@gmail.com> In-Reply-To: On 11/7/2026 3:42 AM, Thomas Bachem via GitGitGadget wrote: > From: Thomas Bachem > > A bundle list that gives bundle.mode, bundle.heuristic, > bundle..uri or bundle..creationToken without a value makes > "git clone --bundle-uri" and "git fetch" segfault: > bundle_list_update() passes the NULL value to strcmp(), relative_url() > or sscanf(). Such a list can also come from a server, through a > bundle URI that it advertises. > > Reject a missing value with config_error_nonbool(). That makes the > list invalid, as an unknown mode or a second uri already does, and > the clone or fetch goes on without the bundles. I'm not sure that this is the most-helpful error message for the bundle URI feature, as this isn't an error in a local config file but in a server-provided file. In that sense, it would be _better_ to provide a hint that the server gave a malformed bundle list. However, this patch is a clear improvement over the current state, so this isn't necessary right now. Doing the minimum "fix the segfaults" fits with the rest of your patches. We can do another pass later to make this error message more helpful, if necessary. Thanks, -Stolee