From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mx.groups.io with SMTP id smtpd.web08.61654.1629324264020076668 for ; Wed, 18 Aug 2021 15:04:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=WQyaorus; spf=pass (domain: nuviainc.com, ip: 209.85.216.43, mailfrom: rebecca@nuviainc.com) Received: by mail-pj1-f43.google.com with SMTP id nt11so3611801pjb.2 for ; Wed, 18 Aug 2021 15:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=I4v198gC0DGg/YOmMZMUi4UEBYYJtWpZZM71GSwceu4=; b=WQyaorusceVA/rB81qwBCLDj96ADUU6MCBObnoaZmUCPZazoCjOVdBuHu9v6k0SyQ6 WDkzhT0eMvW6Po4QZdJRea/MQ6Q3oWu4O9f3GPloouWlnyjVk9U7Ln7Fx1cYzX1lDPod qHVOkZO/USh0Jyh8vmcjGH8yP8uVfdrGjnl40AQc4jY4I33EtMdZ/u8vZij5aihhz0MY etMvFv7y1qdoDSMyLx0F3+MF199uPzNtDJLXokfFpZaLTqrGEcB1rjRsgbF6qLX3Qpa2 XV+BQQeDbbeUhMQ7PDu1fBFCgMLMIhJXgdMF0FROgUUYGWPx5X0P7Mxi6xpAFrD+isaY D5Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=I4v198gC0DGg/YOmMZMUi4UEBYYJtWpZZM71GSwceu4=; b=HwONo7EDqQGiT7N1EX5z0rY94C+1RTjG7I/grvaJqPxP6apCCWy7EGiB1xGiW6UQNP F+mEBh9k92xuN2EirSP5schgZp/0uicAzZcDTIaA7MzVBxWz1IPPR3oMfZEbe7U6Otyi AuCdjUonsAu7eEyFySeQFfqcmM2rmEiy/eAcsfuwO2/R/mNbGPzFCDG4nsopsPbmgh1x kD3/BtbWGdaWjLLJaj3olWLI8m9Y1N/m/WwAOibDYe9vDOq56omEnQBBLje/DkgnPFId WN2aNiapz8x2W7uBMDc05u1NXUru7OgMUwUSX0xHKsa1WAgmzPAILs3B3BRnLB18Xm35 hdeQ== X-Gm-Message-State: AOAM5329Xq998IwlbfS6xk27ZEDSlWuBM3onSbqW5Jt/0As/13ngqs1d cYVvm2SuiOeGBz0AHG81lt76PGSXg99bPrluI3oh/Mhf5Ut2lfMadoa8H1rZCWQcS4tuGZUavrF VK71uDB331SXPZNJ77IazL0XyRoBbxBmYIhxTGisHVZ29DN5VisUTlVwc71Qw8fSOpzIgMb+w X-Google-Smtp-Source: ABdhPJw5PlYryloIA7P+MdpIOJQExctS6TQoHPoFNkoeb14uzSSyyOaUpnp+O2mAxHyvbaOh2WsIcw== X-Received: by 2002:a17:902:b206:b029:12c:2299:aea with SMTP id t6-20020a170902b206b029012c22990aeamr9123998plr.2.1629324263186; Wed, 18 Aug 2021 15:04:23 -0700 (PDT) Return-Path: Received: from linbox.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id c24sm884968pgj.11.2021.08.18.15.04.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Aug 2021 15:04:22 -0700 (PDT) Subject: Re: [edk2-libc Patch] StdLib/PosixLib/GetPass: Update to use safe string functions To: Michael D Kinney , devel@edk2.groups.io References: <20210817153246.1358-1-michael.d.kinney@intel.com> From: "Rebecca Cran" Message-ID: <7ec85e16-d2f5-de03-b9fe-afb4f21098f3@nuviainc.com> Date: Wed, 18 Aug 2021 16:04:21 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210817153246.1358-1-michael.d.kinney@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Reviewed-by: Rebecca Cran -- Rebecca Cran On 8/17/21 9:32 AM, Michael D Kinney wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3361 > > Cc: Rebecca Cran > Signed-off-by: Michael D Kinney > --- > StdLib/PosixLib/GetPass/GetPass.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/StdLib/PosixLib/GetPass/GetPass.c b/StdLib/PosixLib/GetPass/GetPass.c > index 46511e3..8657827 100644 > --- a/StdLib/PosixLib/GetPass/GetPass.c > +++ b/StdLib/PosixLib/GetPass/GetPass.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > > static CHAR8 *ReturnStringAscii = NULL; > > @@ -37,7 +38,7 @@ char *getpass(const char *Prompt) > return (NULL); > } > > - UnicodeStrToAsciiStr(ReturnString, ReturnStringAscii); > + UnicodeStrToAsciiStrS(ReturnString, ReturnStringAscii, UNICODE_STRING_MAX); > > FreePool(ReturnString); >