From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C92A51F461 for ; Tue, 25 Jun 2019 13:39:16 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=hkYVK wnfD34OwPFPjFMhizsnFlEhzmSojHWkwT8N0WhVemr9k6Ey2wRF20PgV+HV2R7dz Prc1FcaNur6qZJxude6jAdd/HQQCKP2qDOthOxwc/usybXqvf+0KUMsmRN8XZK04 a2TATvxyQnnJAK+h0dLTSP+N2S3u7DJlDMwVWw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=84rxZqytPNV eIja55d0XemuSvGU=; b=txtE6Ah0TAL+Ee+l3pyfXVkMmxzpqGbvmAufxoJqeOd YeRGee4QjW6fsO546uLn9eiPrx7uSWiE2PGyYyZPSDCJete3xe7JC5AmXB7/qj9R Mm3lRi5C9qCrobG0/xoDV3t4Pam/1kxQhbvHQ4HLip7LpMaioneLVopzIPkXp4+4 = Received: (qmail 68497 invoked by alias); 25 Jun 2019 13:39:14 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 68482 invoked by uid 89); 25 Jun 2019 13:39:13 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Stefan Liebler Cc: GNU C Library Subject: Re: [PATCH] Fix build warnings in locale/programs/ld-ctype.c References: <45faf360-cad3-7c9b-a914-0823d2724b90@linux.ibm.com> <87pnn12401.fsf@oldenburg2.str.redhat.com> <9110cd0d-ba40-5204-0ee3-cba1e9375035@linux.ibm.com> Date: Tue, 25 Jun 2019 15:39:09 +0200 In-Reply-To: <9110cd0d-ba40-5204-0ee3-cba1e9375035@linux.ibm.com> (Stefan Liebler's message of "Tue, 25 Jun 2019 15:33:18 +0200") Message-ID: <87h88d239e.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Stefan Liebler: > On 6/25/19 3:23 PM, Florian Weimer wrote: >> * Stefan Liebler: >> >>> diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c >>> index e6105928da..cfc9c43fd5 100644 >>> --- a/locale/programs/ld-ctype.c >>> +++ b/locale/programs/ld-ctype.c >>> @@ -1396,7 +1396,8 @@ charclass_symbolic_ellipsis (struct linereader *ldfile, >>> (int) (now->val.str.lenmb - (cp - last_str)), >>> from); >>> - get_character (now, charmap, repertoire, &seq, &wch); >>> + if (get_character (now, charmap, repertoire, &seq, &wch)) >>> + goto invalid_range; >> >> Maybe write: >> >> if (get_character (now, charmap, repertoire, &seq, &wch) != 0) >> >> to match the other function calls? > Okay. That's no problem. If no one opposes, I'll commit the patch > tomorrow with "!= 0". > > Shall I also update the following occurrence in ctype_read? > if (ellipsis_token == tok_none) > { > if (get_character (now, charmap, repertoire, &seq, &wch)) > goto err_label; Oh, I had missed that. If the calls are already inconsistent, you can use your original patch, too. To be honest, I'm more concerned about the other calls to get_character without error checking. Thanks, Florian