Re: [PATCH] ls-files: make option parser keep argv[0]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Walton wrote:
> The ls-files built-in was not asking the option parser to maintain
> argv[0].  This led to the possibility of fprintf(stderr, "...", NULL).
> On Solaris, this was causing a segfault.  On glibc systems, printed
> error messages didn't contain proper strings, but rather, "(null)":...
>
> A trigger for this bug was: `git ls-files -i`
>
> Signed-off-by: Ben Walton <bwalton@xxxxxxxxxxxxxxxxxx>
>

Patch looks good.

Just a thought, maybe we should change the fprintf(stderr,...) and
exit(1) call to a die() and replace the argv[0] with "ls-files" similar
to the die() on line 546. Then your diffstat becomes -1 instead of 0.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]