<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/ShellPkg/Library/UefiShellLib, branch dependabot/github_actions/actions/github-script-9</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-04-24T18:18:47+00:00</updated>
<entry>
<title>ShellPkg/UefiShellLib: Add IsDotOrDotDot() function</title>
<updated>2026-04-24T18:18:47+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2026-04-03T07:18:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=420dab0b24c4b5fa7d1f462b3319877897be63b4'/>
<id>urn:sha1:420dab0b24c4b5fa7d1f462b3319877897be63b4</id>
<content type='text'>
Replace existing checks against L"." and L".." by
a named function.

No functional change.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T19:26:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=8472271daeed6ebb23b6992155b65c029aa42984'/>
<id>urn:sha1:8472271daeed6ebb23b6992155b65c029aa42984</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: Use the newly introduced ShellPrintDefaultEx() alias</title>
<updated>2025-10-01T08:02:57+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-09-18T12:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=aa29d51637d75aaf398fc8bda60af9726690615c'/>
<id>urn:sha1:aa29d51637d75aaf398fc8bda60af9726690615c</id>
<content type='text'>
Make use the newly introduced ShellPrintDefaultEx() alias and
replace wherever it is possible:
- "ShellPrintEx (-1, -1,"
with:
- "ShellPrintDefaultEx ("

No functional change is introduced.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Fix Buffer underflow</title>
<updated>2025-06-13T21:11:49+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2025-06-12T11:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c2eb2136b41eb051847ddba68d28de8863a2babd'/>
<id>urn:sha1:c2eb2136b41eb051847ddba68d28de8863a2babd</id>
<content type='text'>
Having StrLen(Buffer) == 0 results in a Buffer underflow.
Also, StrLen iterates over the Buffer elements until finding a NULL
character. This results in a quadratic search for '\r' characters
in the while loop.

Fix these issues.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Accept "0 " as valid numeric string</title>
<updated>2024-12-16T18:34:43+00:00</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2024-07-23T22:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e99d532fd7224e68026543834ed9c0fe3cfaf88c'/>
<id>urn:sha1:e99d532fd7224e68026543834ed9c0fe3cfaf88c</id>
<content type='text'>
InternalShellIsHexOrDecimalNumber() would fail to interpret e.g. "0 " or
"00 " as valid numeric strings. After skipping the "0" digits as
leading zeroes, it would check if the next character is a valid hex or
decimal digit, which would then fail on the terminating character.

Therefore return success if "leading" zeroes have been consumed and
there are no more characters.

InternalShellStrHexToUint64() would fail to interpret e.g. "0 " or "00 "
as valid numeric strings. After skipping the "0" digits as leading
zeroes, it would find itself surprised by the following space.

Restrict the "bad space" check to the case where it had just consumed
the "x" or "X" marker. Otherwise the space is fine (depending on
StopAtSpace either end of number or interspersed space) since there
were only zeroes so far.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3080

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Only write value if successful conversion</title>
<updated>2024-12-16T18:34:43+00:00</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2024-07-23T22:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d63d5884d7c2f7660175161187ce90852bc2a891'/>
<id>urn:sha1:d63d5884d7c2f7660175161187ce90852bc2a891</id>
<content type='text'>
The ShellConvertStringToUint64() function documentation says:
"Upon a successful return the value of the conversion."

So do not write any value if the conversion failed.

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Simplify check for empty string</title>
<updated>2024-12-16T18:34:43+00:00</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2024-07-24T11:52:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f34a945a8024b8cb548168cae3a4a81600620ebb'/>
<id>urn:sha1:f34a945a8024b8cb548168cae3a4a81600620ebb</id>
<content type='text'>
StrSize() uses StrLen() which counts until the terminating NULL
character.

For checking for an empty string it is more efficient to directly check
for the NULL terminator instead of calling StrSize().

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Correct check for empty string</title>
<updated>2024-12-16T18:34:43+00:00</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2024-07-23T21:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e11a912aa3bd6b3ad69bb90f36f6860de33d846a'/>
<id>urn:sha1:e11a912aa3bd6b3ad69bb90f36f6860de33d846a</id>
<content type='text'>
StrSize() will never return zero since it counts the terminating NULL
character.

An empty string will have the storage size of the terminator.

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg/UefiShellLib: Prevent out-of-bounds access</title>
<updated>2024-12-16T18:34:43+00:00</updated>
<author>
<name>Tormod Volden</name>
<email>debian.tormod@gmail.com</email>
</author>
<published>2024-07-23T21:23:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=ef3a1ef397a2677cccd0e3e7f1287f29f0094e17'/>
<id>urn:sha1:ef3a1ef397a2677cccd0e3e7f1287f29f0094e17</id>
<content type='text'>
If InternalShellStrHexToUint64() is passed a string that starts with 'X'
or 'x' it would try to read the byte before the start of the string
buffer.

Instead check if leading zeroes have been consumed.

Signed-off-by: Tormod Volden &lt;debian.tormod@gmail.com&gt;
</content>
</entry>
<entry>
<title>ShellPkg: 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:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=334f5748869996eee994f9dee41f3e6a3d9bd087'/>
<id>urn:sha1:334f5748869996eee994f9dee41f3e6a3d9bd087</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>
</feed>
