Re: [PATCH 09/10] config API: add "string" version of *_value_multi(), fix segfaults
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 27, 2022, 19:49 UTC
- Message-ID
- <xmqq4jvpkpxd.fsf@gitster.g>
- In-Reply-To
- <patch-09.10-bda9d504b89-20221026T151328Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> Fix numerous and mostly long-standing segfaults in consumers of > the *_config_*value_multi() API. As discussed in the preceding commit > an empty key in the config syntax yields a "NULL" string, which these > users would give to strcmp() (or similar), resulting in segfaults.
Sounds like a good idea.
I would have called them _nonbool(), not _string(), especially because we are not going to have other variants like _int(), though.