git-remote SEGV on t5505 test.
From: SungHyun Nam <hidden>
Date: 2016-06-15 22:44:58
From: SungHyun Nam <hidden>
Date: 2016-06-15 22:44:58
Hello,
The gdb backtrace said:
(gdb) bt
#0 0xff03455c in strlen () from /usr/lib/libc.so.1
#1 0xff087058 in _doprnt () from /usr/lib/libc.so.1
#2 0xff088c18 in printf () from /usr/lib/libc.so.1
#3 0x0007df20 in prune (argc=1556136, argv=0x139cd0) at
builtin-remote.c:590
The codes in builtin-remote.c:590,
printf(" * [%s] %s\n", dry_run ? "would prune" : "prune",
skip_prefix(refname, "refs/remotes/"));
And the 'skip_prefix()' returns NULL in this case.
(The old skip_prefix() never returns NULL).
It seems there is another place need to be checked:
builtin-remote.c:464 : can pass NULL to the strdup().
Regards,
namsh