From 7119488d6721db65c169af291157f7104a4b00a4 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Thu, 18 Oct 2018 13:31:15 -0700 Subject: iASL: add additional check for strings with length zero Without this check there is a bounds violation that occurs when DtTrim attempts to remove a double quote charater later in the function. The End gets set to 1 byte before Start. Suggested-by: Steven Noonan Signed-off-by: Erik Schmauss --- source/compiler/dtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c index b15d3b97f..7da4005fe 100644 --- a/source/compiler/dtio.c +++ b/source/compiler/dtio.c @@ -236,7 +236,7 @@ DtTrim ( /* Skip lines that start with a space */ - if (!strcmp (String, " ")) + if (*String == 0 || !strcmp (String, " ")) { ReturnString = UtLocalCacheCalloc (1); return (ReturnString); -- cgit v1.2.1