Re: [msysGit] Pull request for msysGit patches
- From
Erik Faye-Lund <kusmabite@gmail.com>
- Date
- Sep 28, 2010, 20:58 UTC
- Message-ID
- <AANLkTikSxpXJkeneWbJQ_2g32w1bV-CEdyk2_5G2Xd+u@mail.gmail.com>
- In-Reply-To
- <201009282252.25688.j6t@kdbg.org>
On Tue, Sep 28, 2010 at 10:52 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 6 quoted lines
>> 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))