diff options
| author | Jin Kang <112378607+JinKang021004@users.noreply.github.com> | 2026-10-14 09:34:24 +0300 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2026-10-15 13:15:44 +0300 |
| commit | f14c2884c718926b49198bd5e3061763d5506db5 (patch) | |
| tree | c1d4de65f79e2c3397f4e2f0d110eeb15f1cf99f /UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem | |
| parent | 36bd3ba62c914ed0d9a538a9fe9c1d186f737b1d (diff) | |
| download | edk2-f14c2884c718926b49198bd5e3061763d5506db5.tar.xz | |
ShellPkg/Shell: Terminate and separate the ShellOpt command line
CreatePopulateInstallShellParametersProtocol() combined image load options
and ShellOpt without reserving a NUL terminator. Neither input must carry
one, so ParseCommandLineToArgs() could read beyond the allocation. The
load options also overwrote ShellOpt when both inputs were present.
Read ShellOpt into a separately terminated buffer, validate its CHAR16
size, normalize its effective length, and propagate read failures. Reserve
space for a separator and terminator in the combined buffer.
Preserve the image name at Argv[0] and insert ShellOpt immediately after
it, before the rest of the load options. Appending ShellOpt at the end
would pass shell options as arguments to a script or application named in
the load options. Use the parser's argument-boundary rules so quoted
image paths retain their meaning.
Fixes: https://github.com/tianocore/edk2/issues/10549
Signed-off-by: Jin Kang <112378607+JinKang021004@users.noreply.github.com>
Diffstat (limited to 'UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem')
0 files changed, 0 insertions, 0 deletions
