From: Pat Thoyts <patthoyts@gmail.com>
To: kusmabite@gmail.com
Cc: git@vger.kernel.org, msysgit@googlegroups.com
Subject: Re: Re: [PATCH] mingw: do not crash on open(NULL, ...)
Date: Thu, 23 Sep 2010 21:27:35 +0100 [thread overview]
Message-ID: <AANLkTimviqUqcy40aR=DC--tqKHWXfX9gLMoX7tyjafe@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinJ4kKRsKO6HyqQH4Oy12E1mdqCXxPb2z+59818@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]
(Apparently gmail on a phone insists on top posting)
It looks like this problem was missed by the test suite. Any chance of a
test as well? Got to catch those regressions.
On 23 Sep 2010 19:00, "Erik Faye-Lund" <kusmabite@gmail.com> wrote:
> On Thu, Sep 23, 2010 at 10:35 AM, Erik Faye-Lund <kusmabite@gmail.com>
wrote:
>> Since open() already sets errno correctly for the NULL-case, let's just
>> avoid the problematic strcmp.
>>
>> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
>
> I guess I should add a comment as to why this patch is needed:
>
> This seems to be the culprit for issue 523 in the msysGit issue
> tracker: http://code.google.com/p/msysgit/issues/detail?id=523
>
> fetch_and_setup_pack_index() apparently pass a NULL-pointer to
> parse_pack_index(), which in turn pass it to check_packed_git_idx(),
> which again pass it to open(). This all looks intentional to my
> (http.c-untrained) eye.
>
> The code in mingw_open was introduced in commit 3e4a1ba (by Johannes
> Sixt), and the lack of a NULL-check looks like a simple oversight.
[-- Attachment #2: Type: text/html, Size: 1457 bytes --]
next prev parent reply other threads:[~2010-09-23 20:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 17:35 [PATCH] mingw: do not crash on open(NULL, ...) Erik Faye-Lund
2010-09-23 17:59 ` Erik Faye-Lund
2010-09-23 20:27 ` Pat Thoyts [this message]
2010-09-23 21:06 ` [msysGit] " Erik Faye-Lund
2010-09-23 22:50 ` Junio C Hamano
2010-09-27 13:19 ` Erik Faye-Lund
2010-09-27 13:31 ` [msysGit] " Pat Thoyts
2010-09-27 13:37 ` Erik Faye-Lund
2010-09-27 13:59 ` Johannes Schindelin
2010-09-24 0:32 ` [msysGit] " Johannes Schindelin
2010-09-23 20:08 ` [msysGit] " Johannes Sixt
2010-09-24 14:22 ` Pat Thoyts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTimviqUqcy40aR=DC--tqKHWXfX9gLMoX7tyjafe@mail.gmail.com' \
--to=patthoyts@gmail.com \
--cc=git@vger.kernel.org \
--cc=kusmabite@gmail.com \
--cc=msysgit@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).