public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [COMMITTED] linux: Fix __sem_check_add_mapping name length
Date: Tue, 09 Feb 2021 19:44:26 +0100	[thread overview]
Message-ID: <87blct2i9h.fsf@igel.home> (raw)
In-Reply-To: <20210209174423.3577809-1-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Tue, 9 Feb 2021 14:44:23 -0300")

On Feb 09 2021, Adhemerval Zanella via Libc-alpha wrote:

> diff --git a/sysdeps/pthread/sem_routines.c b/sysdeps/pthread/sem_routines.c
> index ea7a445324..c2c8b54cd0 100644
> --- a/sysdeps/pthread/sem_routines.c
> +++ b/sysdeps/pthread/sem_routines.c
> @@ -72,6 +72,7 @@ __sem_check_add_mapping (const char *name, int fd, sem_t *existing)
>    size_t namelen = strlen (name);
>    if (namelen > NAME_MAX)
>      return SEM_FAILED;
> +  namelen += 1;

struct search_sem has only room for NAME_MAX.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

      reply	other threads:[~2021-02-09 18:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03 18:34 [PATCH 1/3] linux: Require /dev/shm as the shared memory file system [BZ #25383] Adhemerval Zanella
2021-02-03 18:34 ` [PATCH 2/3] pthread: Refactor semaphore code Adhemerval Zanella
2021-02-07  9:30   ` Florian Weimer
2021-02-03 18:34 ` [PATCH 3/3] pthread: Remove alloca usage from __sem_check_add_mapping Adhemerval Zanella
2021-02-07  9:29   ` Florian Weimer
2021-02-08 16:31     ` Adhemerval Zanella
2021-02-09 19:03   ` [COMMITTED] linux: Fix __sem_check_add_mapping search_sem Adhemerval Zanella
2021-02-07  9:23 ` [PATCH 1/3] linux: Require /dev/shm as the shared memory file system [BZ #25383] Florian Weimer
2021-02-09 17:44 ` [COMMITTED] linux: Fix __sem_check_add_mapping name length Adhemerval Zanella
2021-02-09 18:44   ` Andreas Schwab [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=87blct2i9h.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=libc-alpha@sourceware.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).