<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/ShellPkg/Library/UefiShellCommandLib, branch dependabot/github_actions/actions/setup-python-6</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-6</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fsetup-python-6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2025-07-24T07:57:29+00:00</updated>
<entry>
<title>ShellPkg: Fixed Deadcode and Null field Coverity warnings.</title>
<updated>2025-07-24T07:57:29+00:00</updated>
<author>
<name>Revathy V</name>
<email>revathyv@ami.com</email>
</author>
<published>2025-07-15T09:28:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=be6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b'/>
<id>urn:sha1:be6342d64fa0e13e7792f4dc4a6dfb45bab9cf9b</id>
<content type='text'>
Updated fixes for all Deadcode and Null field Coverity fixes in ShellPkg

Signed-off-by: Revathy &lt;revathyv@ami.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: UefiShellCommandLib: CodeQL Fixes</title>
<updated>2024-10-29T02:09:18+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2024-10-03T17:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c80c222198a88847f3e1ce3e482af8e4c0bd36fa'/>
<id>urn:sha1:c80c222198a88847f3e1ce3e482af8e4c0bd36fa</id>
<content type='text'>
Includes changes across the module for the following CodeQL rules:
 - cpp/comparison-with-wider-type
 - cpp/overflow-buffer
 - cpp/redundant-null-check-param
 - cpp/uselesstest

Co-authored-by: Taylor Beebe &lt;taylor.d.beebe@gmail.com&gt;

Signed-off-by: Oliver Smith-Denny &lt;osde@linux.microsoft.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: Fix typos</title>
<updated>2023-12-08T13:25:11+00:00</updated>
<author>
<name>Page Chen</name>
<email>paiching_chen@apple.com</email>
</author>
<published>2023-11-09T19:27:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fe2abc9b74b9b869e29f0ebc6dfaa54001b53e9b'/>
<id>urn:sha1:fe2abc9b74b9b869e29f0ebc6dfaa54001b53e9b</id>
<content type='text'>
begining-&gt;beginning
dirve-&gt;drive
duplicat-&gt;duplicate
fuly-&gt;fully
Funciton-&gt;Function
Functino-&gt;Function
optioanl-&gt;optional
poitners-&gt;pointers
rountine-&gt;routine
sucessful-&gt;successful
sucessfully-&gt;successfully

Signed-off-by: Page Chen &lt;paiching_chen@apple.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Cc: Andrew Fish &lt;afish@apple.com&gt;
Message-Id: &lt;829d2bed2a848229d719d7ae7b64ef1a47782720.1699557986.git.paiching_chen@apple.com&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: Fix conditionally uninitialized variables</title>
<updated>2023-04-03T15:29:08+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2022-11-08T20:35:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=11dd44dfbefab2ca0b9160bb5ebe40bc1c70f7c1'/>
<id>urn:sha1:11dd44dfbefab2ca0b9160bb5ebe40bc1c70f7c1</id>
<content type='text'>
Fixes CodeQL alerts for CWE-457:
https://cwe.mitre.org/data/definitions/457.html

Cc: Erich McMillan &lt;emcmillan@microsoft.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Michael Kubacki &lt;mikuback@linux.microsoft.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Co-authored-by: Erich McMillan &lt;emcmillan@microsoft.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Reviewed-by: Oliver Smith-Denny &lt;osd@smith-denny.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:54:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=47d20b54f9a65b08aa602a1866c1b59a69088dfc'/>
<id>urn:sha1:47d20b54f9a65b08aa602a1866c1b59a69088dfc</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the ShellPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellCommandLib: suppress incorrect gcc warning</title>
<updated>2021-05-14T10:00:13+00:00</updated>
<author>
<name>Sergei Dmitrouk</name>
<email>sergei@posteo.net</email>
</author>
<published>2021-05-11T22:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=eec44cdd0058ad208fa730796a306eae9138db58'/>
<id>urn:sha1:eec44cdd0058ad208fa730796a306eae9138db58</id>
<content type='text'>
`Dupes` is used only if `Duplicates != NULL` and function is left if
allocation of memory for `Dupes` fails, so it can't be used
uninitialized.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3228
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Signed-off-by: Sergei Dmitrouk &lt;sergei@posteo.net&gt;
Message-Id: &lt;20210511225616.5942-2-sergei@posteo.net&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/ShellCommandLib: add ShellSortFileList()</title>
<updated>2021-01-19T18:23:28+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2021-01-13T08:54:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=101c55ac0db79b9ccff8b612f11755a3d473a82c'/>
<id>urn:sha1:101c55ac0db79b9ccff8b612f11755a3d473a82c</id>
<content type='text'>
Introduce the ShellSortFileList() function, for sorting an
EFI_SHELL_FILE_INFO list, by FileName or by FullName.

Duplicates can be kept in the same list, or separated out to a new list.
In either case, the relative order between duplicates does not change (the
sorting is stable).

For the sorting, use OrderedCollectionLib rather than SortLib:

- The PerformQuickSort() function from the latter has quadratic worst-case
  time complexity, plus it is implemented recursively (see
  "MdeModulePkg/Library/UefiSortLib/UefiSortLib.c"). It can also not
  return an error on memory allocation failure.

- In comparison, the Red-Black Tree instance of OrderedCollectionLib sorts
  in O(n*log(n)) worst-case time, contains no recursion with the default
  PcdValidateOrderedCollection=FALSE setting, and the OrderedCollectionLib
  class APIs return errors appropriately.

The OrderedCollectionLib APIs do not permit duplicates natively, but by
using lists as collection entries, stable sorting of duplicates can be
achieved.

Cc: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3151
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Message-Id: &lt;20210113085453.10168-7-lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/CommandLib: Use first found UC for unsupported PlatformLang</title>
<updated>2019-11-08T00:29:58+00:00</updated>
<author>
<name>Marvin H?user</name>
<email>mhaeuser@outlook.de</email>
</author>
<published>2019-11-05T13:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c'/>
<id>urn:sha1:9e9f0be353d4e28ccbca8f84fc8b2ab1bbe31d5c</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2300

On some firmwares PlatformLang is set to the local language (e.g. ru-RU),
however there is no Unicode Collation protocol instance that supports it.
As for missing PlatformLang, fall back to the first found instance.

Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Signed-off-by: Marvin Haeuser &lt;mhaeuser@outlook.de&gt;
</content>
</entry>
<entry>
<title>ShellPkg: stop using EFI_HANDLE in place of EFI_HII_HANDLE</title>
<updated>2019-10-09T07:40:10+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2019-09-06T21:15:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c44501b313b3d2a28255d9ef5f8bc9644745859e'/>
<id>urn:sha1:c44501b313b3d2a28255d9ef5f8bc9644745859e</id>
<content type='text'>
The UefiShell*CommandsLib instances have constructor functions that do
something like:

  gHiiHandle = HiiAddPackages (...);
  ...
  ShellCommandRegisterCommandName (..., gHiiHandle, ...);

and destructor functions that implement the following pattern:

  HiiRemovePackages (gHiiHandle);

The -- semantic, not functional -- problem is that "gHiiHandle" is
declared with type EFI_HANDLE, and not EFI_HII_HANDLE, in all of these
library instances, even though HiiAddPackages() correctly returns
EFI_HII_HANDLE, and HiiRemovePackages() takes EFI_HII_HANDLE.

Once we fix the type of "gHiiHandle", it causes sort of a butterfly
effect, because it is passed around widely. Track down and update all of
those locations.

The DynamicCommand lib instances use a similar pattern, so they are
affected too.

NOTE: in practice, this patch is a no-op, as both EFI_HII_HANDLE and
EFI_HANDLE are typedefs to (VOID*). However, we shouldn't use EFI_HANDLE
where semantically EFI_HII_HANDLE is passed around.

Cc: Jaben Carsey &lt;jaben.carsey@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/CommandLib: avoid NULL derefence and memory leak</title>
<updated>2019-09-03T07:09:50+00:00</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>xypron.glpk@gmx.de</email>
</author>
<published>2019-05-10T03:24:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8b8e91584555b6193f2099a36502763b47501533'/>
<id>urn:sha1:8b8e91584555b6193f2099a36502763b47501533</id>
<content type='text'>
Since TianoCore EDK2 commit d65f2cea36d1 ("ShellPkg/CommandLib: Locate
proper UnicodeCollation instance") in edk2 the UEFI Shell crashes if EFI
variable PlatformLang is not defined due to dereferencing gUnicodeCollation
gUnicodeCollation (= NULL) in ShellCommandRegisterCommandName().

Furthermore CommandInit() is leaking PlatformLang if
gUnicodeCollation != NULL.

Close the memory leak and use the first UnicodeCollation instance if
PlatfomLang is not defined.

Fixes: d65f2cea36d1 ("ShellPkg/CommandLib: Locate proper UnicodeCollation
instance")
Signed-off-by: Heinrich Schuchardt &lt;xypron.glpk@gmx.de&gt;
Reviewed-by: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Reviewed-by: Jaben Carsey &lt;jaben.carsey@intel.com&gt;
</content>
</entry>
</feed>
