From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web11.2203.1587977694568102110 for ; Mon, 27 Apr 2020 01:54:55 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TUFNG6C2; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587977693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FuT7TzMPwQMJb+u2dPYQuCTi2iGvrwpzMiViFh7uprY=; b=TUFNG6C2448QPtH68qB04NCFf2B2NeYyfqK0fu9MJ0TVcJNjAXZai/UopAOYExB0UKVN0k dKA9GBJEZlYdqjjKGDyNBoybmJyu28AkRPj+lfn8i1kVfxiZvfgse3mncEjd2Rk5TqJFN2 PjfaBoHhVCG1cSCjuHAeFlYziJYOweA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-WeYIwVUFMTCbY19CPTO7bQ-1; Mon, 27 Apr 2020 04:54:51 -0400 X-MC-Unique: WeYIwVUFMTCbY19CPTO7bQ-1 Received: by mail-wm1-f72.google.com with SMTP id 71so8390892wmb.8 for ; Mon, 27 Apr 2020 01:54:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FuT7TzMPwQMJb+u2dPYQuCTi2iGvrwpzMiViFh7uprY=; b=Az1pOVusmPCHO4/hV5qSb0mlXfXG7/ay+0MsKiHAOsjwQQFM9HOdJaf02VN9aCLPtv DmNeyfcf5QRqfl2k0wSwszOI8ilAPTuWAOT868JWphKgBR8Fn8vcQ2aQRX83vqy1hItI 2k+10v6wQDt0Mvx6B/gU05/UiFt2F1tNe9fJBejB/qmvsb2gMEH2yYUmaZHKDC4imKNH T46WMlM7HfDjiSAhTZ+LFAr8K2+FlzMKi5ltCNi5GzXpsVz6j2kDyY4RCiPa6HKYmoV5 ASAl7/dSi1EGOSXwpXo93R1mYX/2sNBuNTZUiQwO6K2aJLR3oaTvGPPFjzJFlJXqmxuB TeAQ== X-Gm-Message-State: AGi0PuYPwJ80ZDX9dADEV0tqoPlHGMc28DlMgjqRCDlyz8PqRqtWAKic or36ULMkiqyymML3OxsY230weCt0ryOiPByoUGKKbHSg5RnegA/LXNqTpZHX7s7RrHOp5kllm6X EUgZye5QxlTZXhg== X-Received: by 2002:a05:600c:24e:: with SMTP id 14mr24211900wmj.62.1587977690442; Mon, 27 Apr 2020 01:54:50 -0700 (PDT) X-Google-Smtp-Source: APiQypJlghVVFIoh+lG2yiBy7kvooEbzPpHQ4WMYC8ir8RhjqD3If8yty6dAiJQQgpFNNfQ8cfkzwg== X-Received: by 2002:a05:600c:24e:: with SMTP id 14mr24211817wmj.62.1587977688779; Mon, 27 Apr 2020 01:54:48 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (137.red-88-21-205.staticip.rima-tde.net. [88.21.205.137]) by smtp.gmail.com with ESMTPSA id i129sm15495151wmi.20.2020.04.27.01.54.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Apr 2020 01:54:48 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH] ShellPkg: smbiosview - print field values as unsigned integers To: devel@edk2.groups.io, rebecca@bsdio.com Cc: Ray Ni , Zhichao Gao References: <20200424225555.187831-1-rebecca@bsdio.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <433dcd98-cbb6-8914-ea9d-1c76f5e73017@redhat.com> Date: Mon, 27 Apr 2020 10:54:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200424225555.187831-1-rebecca@bsdio.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi Rebecca, On 4/25/20 12:55 AM, Rebecca Cran wrote: > This prevents overflow when printing DWORD fields such as the type 17 > tables's extended DIMM size. Similar issue with type 14: ShellPrintEx(-1,-1,L"ItemType %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemType); ShellPrintEx(-1,-1,L"ItemHandle %d: %d\n", Index + 1, Struct->Type14->Group[Index].ItemHandle); Reviewed-by: Philippe Mathieu-Daude > > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Rebecca Cran > --- > .../Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index a75caff3de..be8b7c0a97 100644 > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > @@ -49,7 +49,7 @@ > #define PRINT_STRUCT_VALUE(pStruct, type, element) \ > do { \ > ShellPrintEx(-1,-1,L"%a",#element); \ > - ShellPrintEx(-1,-1,L": %d\n", (pStruct->type->element)); \ > + ShellPrintEx(-1,-1,L": %u\n", (pStruct->type->element)); \ > } while (0); > > #define PRINT_STRUCT_VALUE_H(pStruct, type, element) \ >