Re: [PATCH v5 4/5] merge/pull Check for untrusted good GPG signatures
- From
- Sebastian Götte <jaseg@physik.tu-berlin.de>
- Date
- Mar 31, 2013, 11:57 UTC
- Message-ID
- <515824C2.1020004@physik.tu-berlin.de>
- In-Reply-To
- <039abbea-6a8b-4014-a383-ad2189a6969d@email.android.com>
On 03/31/2013 01:38 PM, Thomas Rast wrote:
Show 22 quoted lines
> "Sebastian Götte" <jaseg@physik.tu-berlin.de> wrote: > >> On 03/31/2013 10:32 AM, Thomas Rast wrote: >>>> + test_must_fail git merge --ff-only --verify-signatures >> side-untrusted 2>mergeerror && >>>> + test_i18ngrep "from an untrusted key" mergeerror >>>> +' >>> >>> This test gives me the following: >>> >>> ==26527== Conditional jump or move depends on uninitialised value(s) >>> ==26527== at 0x4C2D8BC: strchrnul (mc_replace_strmem.c:1084) >>> ==26527== by 0x4989CC: parse_signature_lines (commit.c:1074) >>> ==26527== by 0x498B33: check_commit_signature (commit.c:1100) >>> ==26527== by 0x453719: cmd_merge (merge.c:1246) >>> ==26527== by 0x4057B6: run_builtin (git.c:282) >>> ==26527== by 0x405949: handle_internal_command (git.c:444) >>> ==26527== by 0x405A63: run_argv (git.c:490) >>> ==26527== by 0x405BF2: main (git.c:565) > [...] > > If you have valgrind installed locally, you can also test yourself ;-) just pass --valgrind to the test script.
Ok, I can reproduce this with v6 of the patch:
expecting success:
test_must_fail git merge --ff-only --verify-signatures side-untrusted 2>mergeerror &&
test_i18ngrep "has a good, untrusted GPG signature" mergeerror==1430== Conditional jump or move depends on uninitialised value(s) ==1430== at 0x4C26B5C: strchrnul (mc_replace_strmem.c:711) ==1430== by 0x47B90B: check_commit_signature (commit.c:1057) ==1430== by 0x444212: cmd_merge (merge.c:1245) ==1430== by 0x4050E6: handle_internal_command (git.c:281) ==1430== by 0x40530C: main (git.c:489)
Though I also can't see the problem. strchrnul gets passed a char* that is just fine.