From nobody Fri Jun 14 00:16:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1680786481; cv=none; d=zohomail.com; s=zohoarc; b=i57wdn8p/V3Y05X57lM53u9ZJy1XfDOV7MsDWt6cunOnk/ACBU0yoVuF78C/nSw9G+vaaqWipQE8xmvGZtEa2q3fRbvSZ5MSGnrZyBV7Z3sXGALfnwqHlEntxhWsWo9CwKAY0roFdYwZA6p2OsUOXOXOv3K5G2PtqFCrdJsz2GI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680786481; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=biAWRjnAq5qusNPIvO8qbd5mlr7lvZTxE8BAs1vTrhU=; b=d1H1dfn1z6Fs/V6qvDjIdkdSqdMs3GSvrYTlku2M036Lv7FkOA6UkMZ+hyo5idLHYh2ehJ66voJFJ/66V/Uqm1BGjr71OoDbS4PKjgrP0eqOYpI7bMlsyxPrdyW1LE0kpETfZiv+P34dphREXb9qJxgjSf1SoESX2lc+S4OsQQ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1680786481090641.0112833159313; Thu, 6 Apr 2023 06:08:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-569-h_epGGW8NG-s3soLEfP0-w-1; Thu, 06 Apr 2023 09:07:54 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40B8485C06C; Thu, 6 Apr 2023 13:07:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4F8D492C14; Thu, 6 Apr 2023 13:07:50 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 789EB194658F; Thu, 6 Apr 2023 13:07:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1767F1946587 for ; Thu, 6 Apr 2023 13:07:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BC38340C83AC; Thu, 6 Apr 2023 13:07:48 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 639C440C20FA for ; Thu, 6 Apr 2023 13:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680786479; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=biAWRjnAq5qusNPIvO8qbd5mlr7lvZTxE8BAs1vTrhU=; b=K5OZ4HC4T0Ml7nxk3igXdjyK43lrStDOaIRCZmhkJWX1ALNpfPFE0AumsUtd4OW8kRPypr Xv3DhNpvNW6JB7+prbT67Z3eulZNIV2KJZVAy7zvueKDzLt1UAm/CwAr02enyzw2JEPDgX NXEvuuYH3xHJcyy5iDKO42lg44loqk8= X-MC-Unique: h_epGGW8NG-s3soLEfP0-w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] viracpi: Fir error format string in virAcpiParseIORTNodeHeader() Date: Thu, 6 Apr 2023 15:07:47 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1680786483111100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Inside of virAcpiParseIORTNodeHeader() there's an virReportError() which reports size of a structure using sizeof() operator. Well, it's not well documented but the returned type of sizeof() is apparently size_t but the format string uses %lu. Signed-off-by: Michal Privoznik --- Pushed under build breaker rule. Also verified this builds successfully on a 32bit ARM. src/util/viracpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/viracpi.c b/src/util/viracpi.c index 74fff0f0ac..e66df99f03 100644 --- a/src/util/viracpi.c +++ b/src/util/viracpi.c @@ -102,7 +102,7 @@ virAcpiParseIORTNodeHeader(int fd, * least size of header itself. */ if (nodeHeader->len < sizeof(*nodeHeader)) { virReportError(VIR_ERR_INTERNAL_ERROR, - _("IORT table node type %1$s has invalid length: go= t %2$u, expected at least %3$lu"), + _("IORT table node type %1$s has invalid length: go= t %2$u, expected at least %3$zu"), NULLSTR(typeStr), (unsigned int)nodeHeader->len, si= zeof(*nodeHeader)); return -1; } --=20 2.39.2