From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id DE5223858D35 for ; Mon, 8 Jan 2024 16:02:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE5223858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE5223858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704729752; cv=none; b=hkQxTp2MVvNLn6ARoqCsKn+LoDrxVHUTNw/RZj8jbHR8lP4MIYbkw5vsvzw5S/L4e/cxHBLbUWc2mLIzh+wDAQe3dGasBPkDVkGTylQyaJp2eHDibo0S0S39fXBLtDiwxhQy3rQESxGrzvhWxN8cx9QazFlwxGXMfRMOHgtw9iI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704729752; c=relaxed/simple; bh=tkjCK6i+dJq+0OBXkMJ9I6TE4GRfSzgyP43O1tA2kYM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=rM9677Pc1XyFLnHxVJBO46QgaYL9OQ+qo3DREdK/r7z7GBdmFPe4uYRXWZVOUa4uxv1zVMPyn40qKOYxChxc2jNXpMouveCPFlvNjGMZcNHyNAcpP1kdpG2L3Ueq4h8oPYvE1IcQHWJXYb7kNIx60+0pWsuzQj9APxJZ3PCeW8Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704729750; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=Y3E5qoguSp0yWgbsiC1baVedPtb16E8Nq+ZJH4b8o0I=; b=CgmKuIWSezZUBZ3lkMjPaT+IM/m1Sp25EKsVUL+ZWcq4U1/Nb1bHSsahBSQ8RFlWI+gJrb KnvwW5TwJ6YdZStI4N0WQOYiS43n4UvPkZqfpTtBSNJH9P0tnscgAOEFvUqPDClalaW+3f IFn+QTsX90rH1JkFnijRHTOWVCL+Cps= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-35-GSigj_zQMouzdHsn6QkLXw-1; Mon, 08 Jan 2024 11:02:23 -0500 X-MC-Unique: GSigj_zQMouzdHsn6QkLXw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C9A551C0F486 for ; Mon, 8 Jan 2024 16:02:16 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.39.195.34]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8B98492BC7 for ; Mon, 8 Jan 2024 16:02:16 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 8B34BA809E4; Mon, 8 Jan 2024 17:02:15 +0100 (CET) Date: Mon, 8 Jan 2024 17:02:15 +0100 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH] fix strverscmp comparison of digit sequence with non-digits Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Jan 8 06:56, Brian Inglis wrote: > >From: Rich Felker > Date: Mon, 7 Nov 2022 22:17:55 -0500 > > the rule that longest digit sequence not beginning with a zero is > greater only applies when both sequences being compared are > non-degenerate. this is spelled out explicitly in the man page, which > may be deemed authoritative for this nonstandard function: "If one or > both of these is empty, then return what strcmp(3) would have > returned..." > > we were wrongly treating any sequence of digits not beginning with a > zero as greater than a non-digit in the other string. > > Signed-off-by: Brian Inglis > --- > newlib/libc/string/strverscmp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Pushed. Thanks, Corinna