Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D299C2BB1D for ; Fri, 13 Mar 2020 13:26:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 29321206BE for ; Fri, 13 Mar 2020 13:26:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="HEqe9C85"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="PS6US2pp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 29321206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8032A17D6; Fri, 13 Mar 2020 14:25:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8032A17D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1584105975; bh=kxaxTJVVKZVL7AmzQrIeUTzResAv1y6qY63DhKAUTAY=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HEqe9C85+Lusi6gwQFjZ3kfMq5lpgFn7HT/PdwT9VsbOYpjxso09u/3WDNkXFCvSk PyQD6hzt7GqVGI5sm9g4ioujGovO2gvxYAgm8Qqgl0Jix9l32MWuTxWx9cJOKTGP7Y KF+nOP5OYlMGo/TLyJ2yyOv8O6pu7f+9C1TWZUIU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0180CF801A3; Fri, 13 Mar 2020 14:25:24 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 24F43F801EB; Fri, 13 Mar 2020 14:25:20 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 05F79F80086 for ; Fri, 13 Mar 2020 14:25:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05F79F80086 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="PS6US2pp" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02DDOf69020396; Fri, 13 Mar 2020 08:25:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=1g+yEZHlt2Q04R5aWwm8MjJ2eg5k6k6BPi/8vA7zXSg=; b=PS6US2ppZ2WT6af52sTUusw3XSBtJzLVNDcBr9MiUIsjM1BmF5u9o49+rVS7eAdjwiX4 wXt+3lMI6DhP7Eo9xxHrxSuDemwJt+3UR11ypVZT2Eg4OYohIsQjqRchaMGDUdWLrCna tnzorTH+2F1h9EaoDdUsXN3B3kKyzPJqAzadyn+57EMxnFlZ9TpWy8Zf/9pA18LNmPs6 FJRJg7txWRu6JbbTr0u7Do10CeFd+/mlTSfauvsxlCUEUOn3pUH23eWeKaroT5SpcFux vYHuG+5gOXRmG+V80M0j8Fi4bwBczk5BNHzkDQ8DU1H9OI6iXvh9BuJwOTptHOMPWJB7 pQ== Authentication-Results: ppops.net; spf=fail smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from ediex02.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 2yqt8nsmtm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 13 Mar 2020 08:25:09 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Fri, 13 Mar 2020 13:25:07 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1591.10 via Frontend Transport; Fri, 13 Mar 2020 13:25:07 +0000 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id BB39F2AB; Fri, 13 Mar 2020 13:25:07 +0000 (UTC) Date: Fri, 13 Mar 2020 13:25:07 +0000 From: Charles Keepax To: Takashi Iwai Subject: Re: [PATCH] ASoC: wm_adsp: Use scnprintf() for the limited buffer output Message-ID: <20200313132507.GL108283@ediswmail.ad.cirrus.com> References: <20200313130334.9028-1-tiwai@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200313130334.9028-1-tiwai@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-SPF-Result: fail X-Proofpoint-SPF-Record: v=spf1 include:spf-001ae601.pphosted.com include:spf.protection.outlook.com ip4:5.172.152.52 -all X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 mlxlogscore=788 priorityscore=1501 clxscore=1015 phishscore=0 adultscore=0 mlxscore=0 impostorscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003130070 Cc: alsa-devel@alsa-project.org, Mark Brown X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Fri, Mar 13, 2020 at 02:03:34PM +0100, Takashi Iwai wrote: > snprintf() is a hard-to-use function, it's especially difficult to use > it for concatenating substrings in a buffer with a limited size. > Since snprintf() returns the would-be-output size, not the actual > size, the subsequent use of snprintf() may point to the incorrect > position. > > Use scnprintf() instead for fixing such potential errors. > > Signed-off-by: Takashi Iwai > --- Acked-by: Charles Keepax Thanks, Charles