git-remote SEGV on t5505 test.
- From
- SungHyun Nam <namsh@posdata.co.kr>
- Date
- Jul 18, 2008, 01:46 UTC
- Message-ID
- <g5osl6$4g3$1@ger.gmane.org>
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