|
Message-ID: <CAGw6cBvkazTMyH8FA8nnF4aFzWXh31CYBU8+jQt7RsWRVFXWxg@mail.gmail.com> 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.