From: "Torsten Bögershausen" <tboegi@web.de>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
drizzd@aon.at, git@vger.kernel.org
Subject: Re: [PATCH] unpack-trees.c: check return value of lstat()
Date: Mon, 07 Mar 2011 16:59:10 +0100 [thread overview]
Message-ID: <4D7500CE.8000106@web.de> (raw)
In-Reply-To: <vpqpqq4ge71.fsf@bauges.imag.fr>
On 06.03.11 21:57, Matthieu Moy wrote:
> Torsten Bögershausen <tboegi@web.de> writes:
>
>> On 06.03.11 20:29, Matthieu Moy wrote:
>>> Torsten Bögershausen <tboegi@web.de> writes:
>>>
>>>> + if (!lstat(path, &st))
>>>> + return check_ok_to_remove(path, len, DT_UNKNOWN, NULL, &st,
>>>> + error_type, o);
>>>> } else if (!lstat(ce->name, &st))
>>>
>>> What happens if lstat returns a non-0 value?
>> The result of "st" is 100% garbage, and should not be passed to
>> anybody.
>
> With your code, you don't do a return, you'll reach the end of the
> function without calling return, which is probably the worst thing you
> could expect.
>
>> v1.7.4 says:
>> commit e39212ab08e8d37dda5d8fd32b54099fe01dbbdb
>> Merge: 716958c 9e08273
>
> You've cut the date:
>
> commit e39212ab08e8d37dda5d8fd32b54099fe01dbbdb
> Merge: 716958c 9e08273
> Author: Junio C Hamano <gitster@pobox.com>
> Date: Wed Dec 22 14:40:26 2010 -0800
>
> => no big surprise that you don't see the bugfix from Jan 12th.
>
>>> Anyway, this seems to have been fixed by a93e53018 (Wed Jan 12 20:28:09
>>> 2011, unpack-trees: handle lstat failure for existing file) already.
>
> Did you look at the content of this commit?
>
>> (And I had to correct drizzd@aon.a -> drizzd@aon.at)
>
> Yes, because you've mis-spelled it in the first place and I didn't fix
> it ;-).
>
Ojojo,
While working with the best tracking tool, I lost tracking myself.
That's why I missed Jonathans fix and learned today 9e08273 != a93e53018
Thanks for the patience, (and sorry for the noise)
/Torsten
prev parent reply other threads:[~2011-03-07 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-06 19:13 [PATCH] unpack-trees.c: check return value of lstat() Torsten Bögershausen
2011-03-06 19:29 ` Matthieu Moy
2011-03-06 19:50 ` Torsten Bögershausen
2011-03-06 20:57 ` Matthieu Moy
2011-03-07 15:59 ` Torsten Bögershausen [this message]
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=4D7500CE.8000106@web.de \
--to=tboegi@web.de \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=drizzd@aon.at \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.