Skip to content
Commit 4f046505 authored by Ray Ni's avatar Ray Ni
Browse files

ShellPkg: Avoid buffer out-of-bound access



PathSize is the number of bytes in PathForReturn buffer so
PathForReturn[PathSize - 1] incorrectly accesses the last
character in the buffer,
PathForReturn[PathSize / sizeof (CHAR16) - 1] should be used.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: default avatarRuiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: default avatarSteven Shi <steven.shi@intel.com>
parent 1557f05b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment