From patchwork Thu Apr 11 10:43:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 787953 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp157241wrm; Thu, 11 Apr 2024 03:44:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVFxw8i5/xC9rzHrr83Xynasx5b02tlQldHYX5LNiqQqjVKiwL50zwTDooLBBl7GkP7xOpgt0ody2iuJxDZoaFT X-Google-Smtp-Source: AGHT+IGnnld4Skq6inR8QffS09pDYS4BZYz1YB3zbGrlnnw6vgvBFxZGTBObxK6mFwzlU8G3ic+G X-Received: by 2002:a37:e101:0:b0:78d:7738:67fb with SMTP id c1-20020a37e101000000b0078d773867fbmr5198198qkm.11.1712832294823; Thu, 11 Apr 2024 03:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712832294; cv=none; d=google.com; s=arc-20160816; b=O5tNKcjLUE16r28PN0sq7DgRZZbjWhk4DAKzxbk5WgqCTWBl+jOSQkUIQJ/8YBbyQg KZPc8DKJaXiabrtX4yo37q4GZ3tgB30MxaGhDhoJCD3lkOClI3hlIATpxrCyEDzc1oJ3 +u5Xk/OVM7emR8k9TSkAB1kObeH59/hJhvRmMPdPbir6aFZoTpkfpjOJU61toXKsjPbA ImDwM1Arhv0WAZiwAm3CsZPhyKvdW7jO8V39OCODQ/Zp8l08wf7SQF4ytkPq4dO8U2Lo oaTsL2BsTjXruzPkoWvfrM+Y/mjaPpuZhBJxvgw2AnFu4mrxXk1nd77BsTEWjAf/c70q cbeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=u3g1QSRg86bxVtcxnKKn01h0Ac3fWVT80PO+fMEEjTc=; fh=zddFdJsj323aRCRVsCQ7JYw2DAFyzl89eLvTLFSIJpA=; b=VBHzRzGcMG3lj0y6eiT0xxdo+j+46GFc4OcwX+ipjnTncbERPoXMBsHqEGic9GIYjA O0smgkrWLW562llUnu2YSnfqj+zGuld4yCchU4hXfZi6/zJaMgXBHCgVjY/jivy+Wc0o 6Y2+r4zcvex0Z1ztxnDqgAr1tzwANDZY+KJxJGulNcMpF2lDZtwqVrAfCs/yOj691ICe VV+W19zEBYvLaJgvpxsYe+sALEXqiLZ6rOrx1cZY3ZwKuKUfDLgXxHkymRpIaifGTSij Qs8yl0TDYcJd7k/MiupqtLji3IWqma7sMRrmDemUcozLK5X7Usisn7u+GL4ut5Zztt99 GvqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujZpLNuG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id wx12-20020a05620a5a4c00b0078d39c48240si1232273qkn.237.2024.04.11.03.44.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2024 03:44:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ujZpLNuG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruruM-0002lt-VX; Thu, 11 Apr 2024 06:43:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruruL-0002kv-A1 for qemu-devel@nongnu.org; Thu, 11 Apr 2024 06:43:53 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ruruI-0004BG-T3 for qemu-devel@nongnu.org; Thu, 11 Apr 2024 06:43:53 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-343f1957ffcso449401f8f.0 for ; Thu, 11 Apr 2024 03:43:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712832229; x=1713437029; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u3g1QSRg86bxVtcxnKKn01h0Ac3fWVT80PO+fMEEjTc=; b=ujZpLNuGHK2mgdbNq1+2c8R/e0NYK1eJuktMVqdvKiJhiB4WtUPEa8yu1DKTX9KJu6 iH3B8pl8mwtJE3vId/+Xvaz9Eyy53LyIZLniC92hpKueuIJ9gXidZVC+yYgSSS6SzpfR HHPINm0UkW+MKIFrPbo+M0FriOEdFfbvIDWpoSAPMiqq8/iOUcrsV8i+tYCvQNX+/8sC DQu4PnehSbTywx1gtfTnnqFRQ2T2teeXLgdQ0+1b5C048d8GuPevS1kigPRLqteMFuQB +ob8Y0yH/Q8fvaWpcAEKS+ZpHNraGxM6Ns7yTXb5LoNRzsPBIM6W1zEwKo/zQwqNlVA9 9izQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712832229; x=1713437029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u3g1QSRg86bxVtcxnKKn01h0Ac3fWVT80PO+fMEEjTc=; b=lnqLnH+DVk+XUbVSpQq82dR3GpK1VSEiPefytIDHou9A3d+GRwBah3XR2YcahcshD/ 06plHmXgqDiTQeuvzXVCWhUHY7f/LA9TOgceO5KqdYkIs3QmJK0f71w0cpllzOp0hZWG XbJEou2fql09EkOIrxJGcOkdKNgPqWnUBN4LD2vET+ZwmiPoLGaWkeMfXclMpxGp4A17 9d1Xk//MiDWql/eK7Zue/49rAqxBwZfTWRVo/oIqH1vKoFnH0VOgkE6rmMRYcNLjjTma ono1yGd9ISfqnrl7C91TcukeHWrLhDJugbcc5L/WOv06PaihUrRVIfQ++RmMQZGWL6IR rkfw== X-Gm-Message-State: AOJu0YywRDbbczg9elMXAWq4Y7PrR9elTfuMxnmg/q46JDf4458/SlPr +YX4Lkz5CfihNPfOHTqB9nV/4FAp0VJ1F4h+2B/MMdj3d2GaROfHOoMBpsiEllXClkBFvvnN6Q3 n4kE= X-Received: by 2002:a5d:456d:0:b0:346:65dd:5580 with SMTP id a13-20020a5d456d000000b0034665dd5580mr1693002wrc.3.1712832229124; Thu, 11 Apr 2024 03:43:49 -0700 (PDT) Received: from localhost.localdomain (137.red-88-29-174.dynamicip.rima-tde.net. [88.29.174.137]) by smtp.gmail.com with ESMTPSA id m5-20020a5d6245000000b0034334af2957sm1469250wrv.37.2024.04.11.03.43.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 11 Apr 2024 03:43:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Laurent Vivier Subject: [PATCH 1/9] disas/m68k: Replace sprintf() by snprintf() Date: Thu, 11 Apr 2024 12:43:32 +0200 Message-ID: <20240411104340.6617-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240411104340.6617-1-philmd@linaro.org> References: <20240411104340.6617-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson --- disas/m68k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/m68k.c b/disas/m68k.c index 1f16e295ab..800b4145ac 100644 --- a/disas/m68k.c +++ b/disas/m68k.c @@ -1000,7 +1000,7 @@ print_indexed (int basereg, /* Generate the text for the index register. Where this will be output is not yet determined. */ - sprintf (buf, "%s:%c%s", + snprintf(buf, sizeof(buf), "%s:%c%s", reg_names[(word >> 12) & 0xf], (word & 0x800) ? 'l' : 'w', scales[(word >> 9) & 3]);