Re: contrib/credential/netrc/git-credential-netrc: Use of uninitialized value in string

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

 



On Tue, Sep 03, 2013 at 11:23:14AM -0400, Ted Zlatanov wrote:

> Yes, you're right.  Something like the following (untested) could work
> and does the wildcards, which I will make into a proper patch and test
> if it looks OK to you.
> 
> Ted
> 
> diff --git a/contrib/credential/netrc/git-credential-netrc b/contrib/credential/netrc/git-credential-netrc
> index 6c51c43..13e537b 100755
> --- a/contrib/credential/netrc/git-credential-netrc
> +++ b/contrib/credential/netrc/git-credential-netrc
> @@ -369,7 +369,10 @@ sub find_netrc_entry {
>         {
>                 my $entry_text = join ', ', map { "$_=$entry->{$_}" } keys %$entry;
>                 foreach my $check (sort keys %$query) {
> -                       if (defined $query->{$check}) {
> +                       if (!defined $entry->{$check}) {
> +                              log_debug("OK: entry has no $check token, so any value satisfies check $check");
> +                       }
> +                       elsif (defined $query->{$check}) {
>                                 log_debug("compare %s [%s] to [%s] (entry: %s)",
>                                           $check,
>                                           $entry->{$check},

Yeah, that makes sense to me (and is basically what the credential-cache
and credential-store helpers do internally). Thanks for working on this.

-Peff
--
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]