In function EdbLoadCodBySymbolByIec(), AsciiStrGetNewTokenField() at line
1589 will return NULL if the first character in 'LineBuffer' is '\0'. But
the previous if statement at line 1576 ensures the above case will not
happen.
This commit adds ASSERT as warnings for the case that will not happen.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2016, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
// get function name, function name is followed by char 0x09.\r
//\r
FieldBuffer = AsciiStrGetNewTokenField (LineBuffer, Char);\r
// get function name, function name is followed by char 0x09.\r
//\r
FieldBuffer = AsciiStrGetNewTokenField (LineBuffer, Char);\r
+ ASSERT (FieldBuffer != NULL);\r
if (AsciiStriCmp (FieldBuffer, Name) == 0) {\r
BufferStart = FieldBuffer;\r
CodParseState = EdbEbcCodParseStateSymbolStart;\r
if (AsciiStriCmp (FieldBuffer, Name) == 0) {\r
BufferStart = FieldBuffer;\r
CodParseState = EdbEbcCodParseStateSymbolStart;\r