git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [msysGit] [PATCH] mingw: do not crash on open(NULL, ...)

From
Pat Thoyts <patthoyts@gmail.com>
Date
Sep 24, 2010, 14:22 UTC
Message-ID
<AANLkTikEvoXuN+vrxry5mz7CM2AuzgBUvUoQxW+zs5oY@mail.gmail.com>
In-Reply-To
<201009232208.56916.j6t@kdbg.org>
On 23 September 2010 21:08, Johannes Sixt <j6t@kdbg.org> wrote:
Show 16 quoted lines
> On Donnerstag, 23. September 2010, Erik Faye-Lund wrote:
>> @@ -297,7 +297,7 @@ int mingw_open (const char *filename, int oflags, ...)
>>       mode = va_arg(args, int);
>>       va_end(args);
>>
>> -     if (!strcmp(filename, "/dev/null"))
>> +     if (filename && !strcmp(filename, "/dev/null"))
>>               filename = "nul";
>>
>>       fd = open(filename, oflags, mode);
>
> Good catch, thank you!
>
> Acked-by: Johannes Sixt <j6t@kdbg.org>
>
> -- Hannes
Applied to devel and pushed.
Previous: Johannes Sixt
Message 12 of 12 in “mingw: do not crash on open(NULL, ...)”
  1. mingw: do not crash on open(NULL, ...)Erik Faye-Lund, Sep 23, 2010
  2. Erik Faye-LundSep 23, 2010
  3. Pat ThoytsSep 23, 2010
  4. Erik Faye-LundSep 23, 2010
  5. Junio C HamanoSep 23, 2010
  6. Erik Faye-LundSep 27, 2010
  7. Pat ThoytsSep 27, 2010
  8. Erik Faye-LundSep 27, 2010
  9. Johannes SchindelinSep 27, 2010
  10. Johannes SchindelinSep 24, 2010
  11. Johannes SixtSep 23, 2010
  12. Pat ThoytsSep 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.