public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-libc Patch] StdLib/PosixLib/GetPass: Update to use safe string functions
@ 2021-08-17 15:32 Michael D Kinney
  2021-08-18 22:04 ` Rebecca Cran
  0 siblings, 1 reply; 2+ messages in thread
From: Michael D Kinney @ 2021-08-17 15:32 UTC (permalink / raw)
  To: devel; +Cc: Rebecca Cran

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3361

Cc: Rebecca Cran <rebecca@nuviainc.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
 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 <Library/MemoryAllocationLib.h>
 #include <Library/UefiLib.h>
 #include <Library/PcdLib.h>
+#include <limits.h>
 
 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);
 
-- 
2.32.0.windows.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-libc Patch] StdLib/PosixLib/GetPass: Update to use safe string functions
  2021-08-17 15:32 [edk2-libc Patch] StdLib/PosixLib/GetPass: Update to use safe string functions Michael D Kinney
@ 2021-08-18 22:04 ` Rebecca Cran
  0 siblings, 0 replies; 2+ messages in thread
From: Rebecca Cran @ 2021-08-18 22:04 UTC (permalink / raw)
  To: Michael D Kinney, devel

Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>


-- 
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 <rebecca@nuviainc.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
>   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 <Library/MemoryAllocationLib.h>
>   #include <Library/UefiLib.h>
>   #include <Library/PcdLib.h>
> +#include <limits.h>
>   
>   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);
>   

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-18 22:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-17 15:32 [edk2-libc Patch] StdLib/PosixLib/GetPass: Update to use safe string functions Michael D Kinney
2021-08-18 22:04 ` Rebecca Cran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox