From e395ca103d2bb290a7052d16f8338b7a4dcb1554 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Thu, 2 May 2019 23:47:46 +0300 Subject: [PATCH] OcConsoleLib: Fix potential null pointer dereference --- Library/OcConsoleLib/OcConsoleLib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/OcConsoleLib/OcConsoleLib.c b/Library/OcConsoleLib/OcConsoleLib.c index c24e9f85..fae624f6 100644 --- a/Library/OcConsoleLib/OcConsoleLib.c +++ b/Library/OcConsoleLib/OcConsoleLib.c @@ -357,9 +357,12 @@ ParseResolution ( *Width = 0; *Height = 0; - *Bpp = 0; *Max = FALSE; + if (Bpp != NULL) { + *Bpp = 0; + } + if (AsciiStrCmp (String, "Max") == 0) { *Max = TRUE; return;