Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3111879pxv; Mon, 12 Jul 2021 09:32:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2WsNzN5bsRnVkW1z1gh+M7RAv09H69+l4i6xp2dVJ3P2256qSM0igz7qRsUgb5MATuxKe X-Received: by 2002:a6b:ec07:: with SMTP id c7mr21231165ioh.115.1626107547828; Mon, 12 Jul 2021 09:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626107547; cv=none; d=google.com; s=arc-20160816; b=Jq4ShgLSoRmSnF0MOnDE/+sFiDegzeSPnWSZElh/SxKQsfJ0ZOYblIjDZMZeZ0HaBW 3LzDlNh1SM2h6xPWBoVLfF2NfycvP1qEVew9i8UuXscbyOCtgkAE4tiPuoOqMKFIA9mk oVdIo+MRedMl+neUcG4Vilori3xWpK0qzFdvqp09KmvXJtir7QHNVUA3wFv727/kQxzB C/gDs4h/jUYyYWE7GBILO95qinQu0Ss0HCBDISdrsh3vBkGrhYVrz/cSUWE3wzec97gV GqTfwcRxB2TppBpbfNDY71+ESR84trTytR9SIZaC70rtaVmqjDEjAGumAgsU76CY2uA4 ehNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=8r2mVxvQ2W9A036gz/8WosmExW+Tk+VHSBft4h3Kni0=; b=zVhovb6u3UD4NDmpiVULZ9ZBx1W4+V5Bw1k+HK+0U0abCv9QZXuf2xa5fU0uEcoXtz Jny5uMGEQAXV6s1zia9n5BtlDghxEW7joYESpL3vlBFIaaguni79v0NSO69X0RaYSP86 oSDfZCtGzI1/pPNkOS2iCLq2CohR7bwgGw3hi/rCChTuUUawH8JsB/QclCWva9kpeIN8 kBmfbaVV8PiKRxei8s2OL8HtLWSiAlsqIhw4/tqu7t0ZlNFEeya96DpurMr7Czw1rbKN LE/Hsay1QqHGnKemwBvmgPsxZ4MUF4bKqmz2rRIp0MFjMEDlojmZYPJiba8P6EhicYTm mvnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si19104061ilq.51.2021.07.12.09.32.14; Mon, 12 Jul 2021 09:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233756AbhGLQdC (ORCPT + 99 others); Mon, 12 Jul 2021 12:33:02 -0400 Received: from smtprelay0073.hostedemail.com ([216.40.44.73]:43644 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229848AbhGLQdA (ORCPT ); Mon, 12 Jul 2021 12:33:00 -0400 Received: from omf13.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 60D3322AC5; Mon, 12 Jul 2021 16:30:10 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA id EA34B1124FC; Mon, 12 Jul 2021 16:30:08 +0000 (UTC) Message-ID: Subject: Re: [RESEND] edac: replace sprintf() by scnprintf() From: Joe Perches To: Salah Triki Cc: bp@alien8.de, mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com, rric@kernel.org, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 12 Jul 2021 09:30:07 -0700 In-Reply-To: <20210712120945.GA777994@pc> References: <20210710163505.GA689509@pc> <20210712120945.GA777994@pc> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamout05 X-Rspamd-Queue-Id: EA34B1124FC X-Spam-Status: No, score=1.60 X-Stat-Signature: wjtbxdjhp6ep6wtwepef198ee96pcjqk X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX182w6M9EvDj0DusiyTsO0pSTMh9wkPUFdk= X-HE-Tag: 1626107408-422958 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2021-07-12 at 13:09 +0100, Salah Triki wrote: > On Sat, Jul 10, 2021 at 09:58:46AM -0700, Joe Perches wrote: > > On Sat, 2021-07-10 at 17:35 +0100, Salah Triki wrote: > > > Replace sprintf() by scnprintf() in order to avoid buffer overflows. > > Maybe name should be moved into the loop too. > In addition, for moving the > declaration of name inside the loop we need to compile the source in > C99 mode. You need to read the c90 spec.