]> git.ipfire.org Git - thirdparty/git.git/commit
config API users: test for *_get_value_multi() segfaults
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 28 Mar 2023 14:04:26 +0000 (16:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Mar 2023 14:37:53 +0000 (07:37 -0700)
commit1c7e239bd0bc91d6296835e30fa597b8c56e752d
tree094db4d43dedd535714f1145b25f430d04872767
parentf7b2ff95163247a3ec437f0ce78bb27cdac68b75
config API users: test for *_get_value_multi() segfaults

As we'll discuss in the subsequent commit these tests all
show *_get_value_multi() API users unable to handle there being a
value-less key in the config, which is represented with a "NULL" for
that entry in the "string" member of the returned "struct
string_list", causing a segfault.

These added tests exhaustively test for that issue, as we'll see in a
subsequent commit we'll need to change all of the API users
of *_get_value_multi(). These cases were discovered by triggering each
one individually, and then adding these tests.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4202-log.sh
t/t5310-pack-bitmaps.sh
t/t7004-tag.sh
t/t7413-submodule-is-active.sh
t/t7900-maintenance.sh