From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2349C7803D0 for ; Wed, 6 Sep 2023 10:34:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=VAYciIWuNUhjS+QeTGQOz98fQRC/9XZwlypzsiX9nLQ=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1693996455; v=1; b=suhKVJ1iKraWgaJjlXM+3gc/bNT3PJ61ByCdn7r3wdEohwLWW1A7gLMhh24zk5oJ4YVMNjD6 1zE2j60N/a7JAo/pW6f7eHnFnGKMDn6MLlsIAU0ouXJtKC/BaxtqjUEBKnYpYLCTtWLrRgP0PNO 7B6pf1IkPqRV3XAtR4JL/VwY= X-Received: by 127.0.0.2 with SMTP id eJAaYY7687511xjKEl1BS11n; Wed, 06 Sep 2023 03:34:15 -0700 X-Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web10.5460.1693996454927644580 for ; Wed, 06 Sep 2023 03:34:15 -0700 X-Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-31f4a286ae1so2253491f8f.3 for ; Wed, 06 Sep 2023 03:34:14 -0700 (PDT) X-Gm-Message-State: 7SxUJSSnDTklJ0KjdcPCaZtZx7686176AA= X-Google-Smtp-Source: AGHT+IH0RYy7TzQQ56Q6oNmwCeBdE7TcMDa2UGxnzD91jBfce6aPa7yW4S7YNj5Uhjbo3dkUkH/3EA== X-Received: by 2002:adf:fec3:0:b0:31c:5c77:48ec with SMTP id q3-20020adffec3000000b0031c5c7748ecmr1863710wrs.62.1693996452958; Wed, 06 Sep 2023 03:34:12 -0700 (PDT) X-Received: from Michaels-iMac.lan ([193.219.99.195]) by smtp.gmail.com with ESMTPSA id x18-20020adfec12000000b0031989784d96sm20121686wrn.76.2023.09.06.03.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 03:34:12 -0700 (PDT) From: "Mike Beaton" To: devel@edk2.groups.io Cc: Eric Dong , Liming Gao , Samer El-Haj-Mahmoud , Ard Biesheuvel , Dandan Bi , Mike Beaton Subject: [edk2-devel] [PATCH v3] MdeModulePkg/HiiDatabase: Fix incorrect AllocateCopyPool size Date: Wed, 6 Sep 2023 11:33:39 +0100 Message-ID: <20230906103338.3320-2-mjsbeaton@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mjsbeaton@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=suhKVJ1i; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io AsciiStrLen was one byte too short (though with alignment up from an odd size would probably always have had the required space in practice). AsciiStrSize matches usage elsewhere in this file and in the codebase. Signed-off-by: Mike Beaton --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c index 96e05d4cf9..f67b7760f0 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c @@ -1987,7 +1987,7 @@ GetNameFromId ( NULL ); if (BestLanguage == NULL) { - BestLanguage = AllocateCopyPool (AsciiStrLen ("en-US"), "en-US"); + BestLanguage = AllocateCopyPool (AsciiStrSize ("en-US"), "en-US"); ASSERT (BestLanguage != NULL); } -- 2.41.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108322): https://edk2.groups.io/g/devel/message/108322 Mute This Topic: https://groups.io/mt/101189764/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-