From: ludo@gnu.org (Ludovic Courtès)
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: patch: Set PATH_MAX for HURD systems.
Date: Thu, 11 Jun 2015 17:04:27 +0200 [thread overview]
Message-ID: <87si9ywakk.fsf@gnu.org> (raw)
In-Reply-To: <CAFtzXzNzVRrqM-JMpAMUj3kej-iNFC6NLfZEWks3qAobS=Fu2Q@mail.gmail.com> (Manolis Ragkousis's message of "Thu, 11 Jun 2015 12:35:26 +0300")
Manolis Ragkousis <manolis837@gmail.com> skribis:
> Hey Ludo,
>
> On 10 June 2015 at 22:38, Ludovic Courtès <ludo@gnu.org> wrote:
>> Please use the patch from
>> <http://lists.gnu.org/archive/html/bug-patch/2015-06/msg00009.html>,
>> and be sure to mention that URL in the .patch file.
>
> Ok, but this patch is not enough. There is another occurrence of
> PATH_MAX later in the same file.
>
> The attached patch is an update of your patch.
>
> Ok to use this version?
[...]
> if (S_ISLNK (mode))
> {
> - char *buffer = xmalloc (PATH_MAX);
> + char *buffer = xmalloc (tost->st_size + 1);
>
> - if (safe_readlink (from, buffer, PATH_MAX) < 0)
> + if (safe_readlink (from, buffer, tost->st_size) < 0)
LGTM; do send it to bug-patch as well.
Besides, I think this code misses:
buffer[tost->st_size] = '\0';
once safe_readlink has succeeded. I wonder why that even works
currently.
Thanks,
Ludo’.
prev parent reply other threads:[~2015-06-11 15:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 13:23 [PATCH] gnu: patch: Set PATH_MAX for HURD systems Manolis Ragkousis
2015-06-10 19:38 ` Ludovic Courtès
2015-06-11 9:35 ` Manolis Ragkousis
2015-06-11 15:04 ` Ludovic Courtès [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=87si9ywakk.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=Guix-devel@gnu.org \
--cc=manolis837@gmail.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
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.