Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 9 Jul 2021 01:06:51 -0700
From: Michael Forney <mforney@...rney.org>
To: musl@...ts.openwall.com
Cc: √Črico Nogueira <ericonr@...root.org>
Subject: Re: [PATCH] add pthread_getname_np function

On 2021-04-20, √Črico Nogueira <ericonr@...root.org> wrote:
> +	if ((fd = open(f, O_RDONLY|O_CLOEXEC)) < 0 || (len = read(fd, name, len)) < 0) status = errno;

This read error check isn't quite right. len has type size_t (which is
unsigned), so (len = ...) < 0 is always false. I think you probably
need to use a separate variable here.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.