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: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 401181F670 for ; Mon, 25 Oct 2021 22:18:32 +0000 (UTC) Received: from localhost ([::1]:40248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mf8IZ-0004ya-Cm for normalperson@yhbt.net; Mon, 25 Oct 2021 18:18:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf7xK-0006C0-8h for bug-gnulib@gnu.org; Mon, 25 Oct 2021 17:56:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29026) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mf7xD-00030k-C4 for bug-gnulib@gnu.org; Mon, 25 Oct 2021 17:56:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635198986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QNY5fBPWrTAbO6Us2gal1zUoPQG51R91m84oxRqe2XU=; b=B1epuhSD4H5dGUSyOGmo38EmqRLJLbsvTdfWtVlq7d7jB9TFRmTVaB8PFl5nhBZ9KTzK8j 3ZFXg9HZeEqWRQ7ZpqZLdwa2aKJMKUSpVibVqrQsdW4cQu2Mm/S2LQ4c8qZDvFg7nGCdqX pYl2mo1W2qvcnewZ2xzQjvheC8lFpPQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-399-5r2JWbi_N5uKdgI2DYy94g-1; Mon, 25 Oct 2021 17:56:23 -0400 X-MC-Unique: 5r2JWbi_N5uKdgI2DYy94g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 716DD8018AC for ; Mon, 25 Oct 2021 21:56:22 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.50.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE63219C79; Mon, 25 Oct 2021 21:56:21 +0000 (UTC) From: Robbie Harwood To: bug-gnulib@gnu.org Subject: [PATCH 10/11] Paper over a stringop-overflow warning about wide char handling Date: Mon, 25 Oct 2021 17:55:43 -0400 Message-Id: <20211025215543.111906-11-rharwood@redhat.com> In-Reply-To: <20211025215543.111906-1-rharwood@redhat.com> References: <20211025215543.111906-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rharwood@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=216.205.24.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 25 Oct 2021 18:17:19 -0400 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Jones , Robbie Harwood Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" From: Peter Jones [rharwood@redhat.com: rewrote commit message] Signed-off-by: Robbie Harwood --- lib/vasnprintf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index 360ca6948..7faa11753 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -234,8 +234,11 @@ static size_t local_strnlen (const char *string, size_t maxlen) { +#pragma GCC diagnostic push +#pragma GCC diagnostic warning "-Wstringop-overflow" const char *end = memchr (string, '\0', maxlen); return end ? (size_t) (end - string) : maxlen; +#pragma GCC diagnostic pop } # endif # endif -- 2.33.0