From nobody Wed Nov 27 16:47:41 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697722689; cv=none; d=zohomail.com; s=zohoarc; b=KMNNjKLScubsMFq1IMKwK5edPx0OppnU+E2MoM1rGsk/cU6nCzU2bFfmm9bOQtDWiPD+W+st+y5HzT4Su/k/YaNmpR7duRf5PdP52YGmIV+r4W8OZUaqo2fr1b0masHA0E2Xr8pXRQGFCoHYfX46ffXYQJYvseEP2goGea0ZNcs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697722689; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=g9r6zIkMYz7JcnSG+rRRxCK1RkPWO1zbCKf8oqt+HSA=; b=MshzS413TXMTyxoGvTUGoVlBVFbHuuT8theoj6hjiZbpg9HusOUKIMhJXByNYufX+CUBiqMrQz15RMOrtSHtyBfMkkjqlb77fl9vONMuMtbLEDpdvJMG73spvoTSRsma7S3V7TQ3w2aOJ1F3Et3Xj9LzhqhKiFV5/kzWhMk07X8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697722689520396.963043867868; Thu, 19 Oct 2023 06:38:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtTCY-0002hY-Jd; Thu, 19 Oct 2023 09:36:40 -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 1qtTBp-0001rX-9S for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:35:54 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtTBg-0001Ck-18 for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:35:49 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40806e40fccso21758515e9.2 for ; Thu, 19 Oct 2023 06:35:43 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id d28-20020adf9b9c000000b0031f3ad17b2csm4512690wrc.52.2023.10.19.06.35.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 06:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697722542; x=1698327342; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=g9r6zIkMYz7JcnSG+rRRxCK1RkPWO1zbCKf8oqt+HSA=; b=FyPoHSuYTT3zGbpuGNnOuW0mK3OanV1ilmoJKA82SiJ/9nOd+wkLcRVAbJDdOOvtL1 H9q8WisnC+gWBoskk6qzUqX6XNUdQkTa0Mc6LMxQhlI0KJTfloIQ60/Ci/qC2JYlOdJA AKml5mnHKp7D8pW9caRNe92hjX8uXM1VYqvIitcGzEJdTo7OKbrJj7cvurmsa6j/yutM KbOTzOgTxslvb1ww7B6v89etnuaPA9pqCMcfR0cwQR0P8Lj+Gs77xGPJm3Z1V5GMT+/E U98+f01SfN+GVhiNclEml+DJAMPnh7GTLgFZNREV11K/bB6tPcwIQWAhpN4iazsoXq26 gHSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697722542; x=1698327342; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g9r6zIkMYz7JcnSG+rRRxCK1RkPWO1zbCKf8oqt+HSA=; b=jlaID1BhzsD9Kw5A/nVllYJ4bhCpbEmHRi6B/k89asHxwDLeiA5sPtVHniJUXH3g9t zZkYsb2tb9hpCUK143q7Lx1nW//Lq/RDXSwL173VxaRTI5YG8Fr1i1cCICjE0ytSTOIk F9s8HqFoIkGZJ+V5plD/J4xnQkcZqYZnXTYOvLkeD1yjkNWyv4q+1WiYIvGrAv+Jc+R0 +OrkHDwTwj/Mw1x0qQOmEKsl4xZUovRAcLHWbW/8Zj0kQRN3yzWVvfuPy4UL5og3tR6g iHYGAy9SWpeAwBqyY13SjFuV1PEAvf5PDlnQN+buxWSZ1LqO36BoCwhUp+eTQKNVrkW7 JOPA== X-Gm-Message-State: AOJu0YyH2qj4LQtkjIyqTWT0rD3PAVxlrRGipP5J8pDYPfrAeV2C6p5u 1a0r6fdFoYnacWFhSVMdFvg/sBy/4Ah+ziZcPjY= X-Google-Smtp-Source: AGHT+IHFH0XD/I6YtzDU1wXg8atVkWbrl2SYTICBFYXkfkEGTPqR2T0Uq8SGNnjvY7Rr+D7mniNDew== X-Received: by 2002:a05:6000:1203:b0:32d:9789:6066 with SMTP id e3-20020a056000120300b0032d97896066mr1856449wrx.5.1697722542324; Thu, 19 Oct 2023 06:35:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/24] elf2dmp: limit print length for sign_rsds Date: Thu, 19 Oct 2023 14:35:20 +0100 Message-Id: <20231019133537.2114929-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231019133537.2114929-1-peter.maydell@linaro.org> References: <20231019133537.2114929-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697722690391100001 Content-Type: text/plain; charset="utf-8" From: Viktor Prutyanov String sign_rsds isn't terminated, so the print length must be limited. Fixes: Coverity CID 1521598 Signed-off-by: Viktor Prutyanov Reviewed-by: Akihiko Odaki Message-id: 20230930235317.11469-2-viktor@daynix.com Signed-off-by: Peter Maydell --- contrib/elf2dmp/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index 5db163bdbe8..6de5c9808ef 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp/main.c @@ -478,7 +478,7 @@ static bool pe_check_pdb_name(uint64_t base, void *star= t_addr, } =20 if (memcmp(&rsds->Signature, sign_rsds, sizeof(sign_rsds))) { - eprintf("CodeView signature is \'%.4s\', \'%s\' expected\n", + eprintf("CodeView signature is \'%.4s\', \'%.4s\' expected\n", rsds->Signature, sign_rsds); return false; } --=20 2.34.1