From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5734 invoked from network); 9 Jul 2021 08:07:08 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 9 Jul 2021 08:07:08 -0000 Received: (qmail 12262 invoked by uid 550); 9 Jul 2021 08:07:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 12241 invoked from network); 9 Jul 2021 08:07:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mforney-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=HpgyqLX6ifSaRwTaNwFLtqcMexpj6LDjDOm9Zk/g8n4=; b=gvkITm3dypKGKGkwZGD9uiaz3FLbvT+wbXKkkoq4jm4ptSdMkOWfMq4/p1bKVPiX09 XQqrfDF/FEblMMUoNmuL+esI9Lyl249FMexXofGawup/dKTCQv9nu9W0ASg8Gr3NGMvW +uPpD60rgxpEj6lNGR/wB58aj/rngMqxpws4UK1sQGubSZ9dIk0hOG2gehJctlBirUgq SKTgoGRyuJGgEqeT6sU7H4c1mlPJtjCzzw+wehtoEL6/PK+UlZblrD1bU1noXYqb2mP0 WaQwgdn91OF39+A6SA3l6MYTUAaIWYVRnnd8Et84GemtGwn351lokL7p428bhCi6gUHw /suA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HpgyqLX6ifSaRwTaNwFLtqcMexpj6LDjDOm9Zk/g8n4=; b=GQtEx16r0/5JvujRoG4hQ8NYPXQgoWEFfDkawbtjEF905S66+DP6TlXvw+IetMowZJ L2AJOV6joWw1/1ZG1Pq/bB7BmsLhUV94V1oM4KY5QLClVgyRnB7nceM1fcZqpVd/nsA4 DT8vLJXfzqTnFodej3dUAhYDYy6H9WElYh7NQrUeLsMeoRQ7HkrpQUuFAhFf2JOi78Gy /Kpmgs8DHupMbHNmTq6fhznDcdBxwmwOEUj2xhPR57rBqJ6an99HCyj/blPBAr1/LeZL x8nrfhyunndgsFOOd1sPjQeuq5T8b9K6SnwhWtYktrv8OqcZTic2QnPF0TatBBw6H2wR LIkg== X-Gm-Message-State: AOAM533GhXN/RLrKrn5SWNVLALW0b9Pz539vyRIwFBeko66KBnXrReo3 AFVYZsSw0PnyuWSKi7VyZCxHsZyMti+hlx+Sdie3ABBH45cFzA== X-Google-Smtp-Source: ABdhPJwFTaHYr0x9RZ9lZBYO/FMZnxxnhsbKeLajXgcQS3DA4IbcRCHdDOuoUacSsqJbQMBUMMbvfNvpiRxRn5lxgyI= X-Received: by 2002:a25:da11:: with SMTP id n17mr45159631ybf.428.1625818012512; Fri, 09 Jul 2021 01:06:52 -0700 (PDT) MIME-Version: 1.0 X-Originating-IP: [73.70.188.119] In-Reply-To: <20210420191519.23822-1-ericonr@disroot.org> References: <20210420191519.23822-1-ericonr@disroot.org> From: Michael Forney Date: Fri, 9 Jul 2021 01:06:51 -0700 Message-ID: To: musl@lists.openwall.com Cc: =?UTF-8?Q?=C3=89rico_Nogueira?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] [PATCH] add pthread_getname_np function On 2021-04-20, =C3=89rico Nogueira wrote: > + if ((fd =3D open(f, O_RDONLY|O_CLOEXEC)) < 0 || (len =3D read(fd, name,= len)) < 0) status =3D errno; This read error check isn't quite right. len has type size_t (which is unsigned), so (len =3D ...) < 0 is always false. I think you probably need to use a separate variable here.