mirror of https://github.com/acidanthera/audk.git
c3492bd9bb
In the for-loop condition of original code, the expression *CurrentCommand != CHAR_NULL is put before expression CurrentCommand < SortedCommandList + SortedCommandListSize/sizeof(CHAR16) When CurrentCommand walks to the end of string buffer, one more character over the end of string buffer will be read and then stop. To fix this issue, just move the last expression to the first one. Because of short-circuit evaludation of and-expression, the following one *CurrentCommand != CHAR_NULL will not be evaluated if the expression before it is evaludated as FALSE. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> |
||
---|---|---|
.. | ||
Alias.c | ||
Cls.c | ||
Echo.c | ||
GetMtc.c | ||
Help.c | ||
Pause.c | ||
Touch.c | ||
Type.c | ||
UefiShellLevel3CommandsLib.c | ||
UefiShellLevel3CommandsLib.h | ||
UefiShellLevel3CommandsLib.inf | ||
UefiShellLevel3CommandsLib.uni | ||
Ver.c |