On Dienstag, 28. September 2010, Erik Faye-Lund wrote: > 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/4e93566b07dcf47ecb6484d >225418c04c1eedee6..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 > if (hide_dotfiles == HIDE_DOTFILES_TRUE && > basename((char*)filename)[0] == '.') ^^^^^^^^ This can crash, too. > 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)) -- Hannes -- 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