From patchwork Fri Apr 12 07:33:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 788257 Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp590949wrm; Fri, 12 Apr 2024 00:36:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUaVFTDDi1KibAJCaeWY2UAjggMSQadOQOO5q/ggsqhlQOccXgxI04Ql6grWddoZ26ba+bGSU31tNHZLmSn1tzb X-Google-Smtp-Source: AGHT+IEjhhpIx31+RCdVUIf4S7eRwDNSLyTK1YFvG4zMOgztnHR5TYKFYCW5av6rie9mbTHct91V X-Received: by 2002:a0c:e14f:0:b0:69b:5516:d547 with SMTP id c15-20020a0ce14f000000b0069b5516d547mr1669806qvl.24.1712907360100; Fri, 12 Apr 2024 00:36:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712907360; cv=none; d=google.com; s=arc-20160816; b=x68l73e3Lpz1cGg+/57LfP3bKzsuXe8h6zhp4CHnJfLqYLxFk+lpRqxZupAM6w9riY EXnH7dwJ3iBURlz+ljcLIsbwQD/AYq7s/rUBjs1r3Q8C0dgSuGbzwPyYPgm3Pau3UP6r QtgPkWEdGNG5bIVzr0jstsZ4hFXD6nL2lQ+guoyuCCFuDwK2G69eGN70n6GIX02zez8n 4dukGXJVsd1gq82VwD/6KmqOSQlipq8SphlQTKBkUfy+F9i24HClbFOG9FCTsUf2W/oC LLVyJI1UCLKvMd0pBRMOLP/oKrOUhmQKnBN9Ne6CfyFo7EMXXwAceRueAozdrufhI5iv /Vgg== 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=SD4AFTXyCoH1gQiMjEXl2qngbfpinlSjJhmj7iTFm1s=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=SfCSbH8iT2O78Y11YlXapj3IdmChMR8ocZFN0BYOjON3HqHKFrA8bHlB1l6HxAVDwE TWKrz8/WBunLz+xvAn/U7I8QXPqtW6cnrIhSGEVyFMlnRxyi6Y+4BNpi5ta3+SzidGRu j5V3Qz5gKN6TFvBZJQx9CQj2ql3kN3V9kd7UcsnJIxZpF7bPQCH4i+fRV72llzTyn21P fvqsS5TD6GSoFioiDpnqTC9ERVwn0xw0XNC2Bweayk0NSno5k/nicjBIuNRhyN4RcKGm FVc5EEgHPfPw2uh4ftNRB2IsZK3iECwa1scgEHB5PX1tGDhdt4X+s8H6MV8nYSJeKmG2 35+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d8kiwJ09; 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 cs5-20020ad44c45000000b006993a4735d5si3207704qvb.187.2024.04.12.00.35.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Apr 2024 00:36:00 -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=d8kiwJ09; 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 1rvBQO-00076F-Op; Fri, 12 Apr 2024 03:34:16 -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 1rvBQL-00075o-Lr for qemu-devel@nongnu.org; Fri, 12 Apr 2024 03:34:15 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rvBQH-0007Cx-Bu for qemu-devel@nongnu.org; Fri, 12 Apr 2024 03:34:12 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6ecf3943040so590694b3a.0 for ; Fri, 12 Apr 2024 00:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712907245; x=1713512045; 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=SD4AFTXyCoH1gQiMjEXl2qngbfpinlSjJhmj7iTFm1s=; b=d8kiwJ09tTOoem0RH9l2oMbxyLJKBTUoO0z3VB1eh9vG/Nwc2lCspwuLIMp3MlK3l0 1eKDaiUNHcUBYEdjXX8lTd/qT4Xm7TEGKThRtgFtulHFFQjyAdbkNjc0T/bWnPYY72yU aqvLOIh+l3yuFxzrPXXDvqAa/YqKqYZkzLsii2Ew0sM9Oy7vMP6yUKO6bxucpTESm4qu yJ/3z2nlKXuEtwzlkW/eFIebjPEdJmvd0+6AS6aTfVJ0/2golKD1IDbJfeR3S1Z7xX60 UX3Kp7TWE8ECkPwVmYbAfrH5rjYzI76SldtqpNSO9ZhJAdK26AI2CovzAh+eM3lc5Uw9 JykQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712907245; x=1713512045; 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=SD4AFTXyCoH1gQiMjEXl2qngbfpinlSjJhmj7iTFm1s=; b=M6DPhfE1DJRWMa3M9akWKuVPvWbX7DZlsPGnCKlpTX77uaXSHeBrGLWF9+FZ86w/x6 CYIhDVx5WIIWkg6rcPLvP0or8rzD//qpwpxWFFago9m6iggqvmWQOBL0uvWS3Cy4qM+5 Tn1ydAeJDm9YIhA0d/CmL4JR4FhRS6k7286LTEfQKtifmh7onmBgRVKiB/qoJqB+49FH 385Ug6e7+Zi3R5m/lZB7sIRsxlmw9r2SjGNJpb3w6HEZj65zXc+9T/u4EnrHioAOhUsk VNFwWJAKHleo1sqIf0jjpGJf0WNEGGtZc1A+p4pMLfb7iEJTSoIaG6FhySgIU2VAaLms tnWA== X-Gm-Message-State: AOJu0Yxh0zmok7czmxzmoL75LIDFcZsF4nKlHlDQwzhP3sQx0pnt81eE yVSmDrrHDsChFBXcG0MS34NFe1Q9ZbNl3tvZ2Gvhz0abRbVSuUj9j/UbS0/5FWzqmmH3bVRI18Z j X-Received: by 2002:a05:6300:630e:b0:1a7:a21b:66f9 with SMTP id jn14-20020a056300630e00b001a7a21b66f9mr1823376pzc.43.1712907245187; Fri, 12 Apr 2024 00:34:05 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id e5-20020a17090301c500b001e556734814sm2206099plh.134.2024.04.12.00.34.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 00:34:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 22/27] linux-user/flatload: Replace sprintf() by snprintf() Date: Fri, 12 Apr 2024 00:33:41 -0700 Message-Id: <20240412073346.458116-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240412073346.458116-1-richard.henderson@linaro.org> References: <20240412073346.458116-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x430.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=ham 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 From: Philippe Mathieu-Daudé 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é Message-Id: <20240411104340.6617-5-philmd@linaro.org> Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- linux-user/flatload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 5b62aa0a2b..1bb2f400bc 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -692,7 +692,7 @@ static int load_flat_shared_library(int id, struct lib_info *libs) char buf[16]; /* Create the file name */ - sprintf(buf, "/lib/lib%d.so", id); + snprintf(buf, sizeof(buf), "/lib/lib%d.so", id); /* Open the file up */ bprm.filename = buf;