Re: [msysGit] Pull request for msysGit patches

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

 



On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@xxxxxxxx> wrote:
>>       mingw: do not crash on open(NULL, ...)
>
> This one is bogus, and as it stands, it must have my Ack removed. :) Needs the
> same fix in mingw_fopen as mingw_freopen. (There remains an unprotected
> dereference of filename.)
>

I believe the version in for-junio already has this fix squashed in.
The following hunk, taken from
http://repo.or.cz/w/git/mingw/4msysgit.git/blobdiff/4e93566b07dcf47ecb6484d225418c04c1eedee6..b18500977d88b13803ecc60cf383538139ec09d8:/compat/mingw.c
shows that it is... Or are you thinking of something else?

@@ -346,7 +346,7 @@ FILE *mingw_fopen (const char *filename, const char *otype)
 	if (hide_dotfiles == HIDE_DOTFILES_TRUE &&
 	basename((char*)filename)[0] == '.')
 		hide = access(filename, F_OK);
-	if (!strcmp(filename, "/dev/null"))
+	if (filename && !strcmp(filename, "/dev/null"))
 		filename = "nul";
 	file = fopen(filename, otype);
 	if (file && hide && make_hidden(filename))
--
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]