diff options
author | Erik Schmauss <erik.schmauss@intel.com> | 2018-10-18 13:31:15 -0700 |
---|---|---|
committer | Erik Schmauss <erik.schmauss@intel.com> | 2018-10-18 13:37:02 -0700 |
commit | 7119488d6721db65c169af291157f7104a4b00a4 (patch) | |
tree | 9fe8e6454810dd1a92e5e62eff1e1eb8ceaa05ac | |
parent | 316dd2c5a0ef0765def988b26e89dc7ac8e42849 (diff) | |
download | acpica-7119488d6721db65c169af291157f7104a4b00a4.tar.gz |
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 <erik.schmauss@intel.com>
-rw-r--r-- | source/compiler/dtio.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |