<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Library/BaseLib/SafeString.c, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2023-03-17T17:55:48+00:00</updated>
<entry>
<title>MdePkg: Update code to be more C11 compliant by using __func__</title>
<updated>2023-03-17T17:55:48+00:00</updated>
<author>
<name>Rebecca Cran</name>
<email>rebecca@quicinc.com</email>
</author>
<published>2023-02-09T14:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=b17a3a133b18fb41493fba7d86e9b5804ea6a8cf'/>
<id>urn:sha1:b17a3a133b18fb41493fba7d86e9b5804ea6a8cf</id>
<content type='text'>
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.

Since it's more standard, replace __FUNCTION__ with __func__ throughout
MdePkg.

Visual Studio versions before VS 2015 don't support __func__ and so
will fail to compile. A workaround is to define __func__ as
__FUNCTION__ :

 #define __func__ __FUNCTION__

Signed-off-by: Rebecca Cran &lt;rebecca@quicinc.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Sunil V L &lt;sunilvl@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Fix out-of-bounds reads in SafeString</title>
<updated>2022-11-07T01:57:09+00:00</updated>
<author>
<name>Pedro Falcato</name>
<email>pedro.falcato@gmail.com</email>
</author>
<published>2022-11-03T01:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=35043a5ec05db6aa86b1b380416923fd1c3506e6'/>
<id>urn:sha1:35043a5ec05db6aa86b1b380416923fd1c3506e6</id>
<content type='text'>
There was a OOB access in *StrHexTo* functions, when passed strings like
"XDEADBEEF".

OpenCore folks established an ASAN-equipped project to fuzz Ext4Dxe,
which was able to catch these (mostly harmless) issues.

Cc: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Cc: Marvin H?user &lt;mhaeuser@posteo.de&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Signed-off-by: Pedro Falcato &lt;pedro.falcato@gmail.com&gt;
Acked-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;Jiewen.yao@Intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg: 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:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2f88bd3a1296c522317f1c21377876de63de5be7'/>
<id>urn:sha1:2f88bd3a1296c522317f1c21377876de63de5be7</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdePkg 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: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d0e2f8232a26453fc0191629ed44ff2a46ea073e'/>
<id>urn:sha1:d0e2f8232a26453fc0191629ed44ff2a46ea073e</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg: Reproduce builds across source format changes</title>
<updated>2021-11-08T18:01:35+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-11-01T20:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5948ec36479f08b282fb68e16c731739748bafcf'/>
<id>urn:sha1:5948ec36479f08b282fb68e16c731739748bafcf</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3688

* Use DEBUG_LINE_NUMBER instead of __LINE__.
* Use DEBUG_EXPRESSION_STRING instead of #Expression.

Cc: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
Cc: Zhiguang Liu &lt;zhiguang.liu@intel.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Tested-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg: Fix SafeString performing assertions on runtime checks</title>
<updated>2020-05-22T00:03:14+00:00</updated>
<author>
<name>Vitaly Cheptsov</name>
<email>vit9696@protonmail.com</email>
</author>
<published>2020-05-19T21:51:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=09fe015af9c5d26b99c9f2e775decdf5489b1037'/>
<id>urn:sha1:09fe015af9c5d26b99c9f2e775decdf5489b1037</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2054

Runtime checks returned via status return code should not work as
assertions to permit parsing not trusted data with SafeString
interfaces.  Replace ASSERT() with a DEBUG_VERBOSE message.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Cc: Bret Barkelew &lt;bret.barkelew@microsoft.com&gt;
Cc: Brian J. Johnson &lt;brian.johnson@hpe.com&gt;
Cc: Chasel Chiu &lt;chasel.chiu@intel.com&gt;
Cc: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Marvin Häuser &lt;mhaeuser@outlook.de&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Vincent Zimmer &lt;vincent.zimmer@intel.com&gt;
Cc: Zhichao Gao &lt;zhichao.gao@intel.com&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Signed-off-by: Vitaly Cheptsov &lt;vit9696@protonmail.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Bret Barkelew &lt;bret.barkelew@microsoft.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:13+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9344f0921518309295da89c221d10cbead8531aa'/>
<id>urn:sha1:9344f0921518309295da89c221d10cbead8531aa</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: Introduce CharToUpper and AsciiCharToUpper publicly</title>
<updated>2019-01-31T12:19:14+00:00</updated>
<author>
<name>Mike Turner</name>
<email>miketur@microsoft.com</email>
</author>
<published>2019-01-30T08:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=5dbfa01e2ec18a255904c98030b7a18420d4bb85'/>
<id>urn:sha1:5dbfa01e2ec18a255904c98030b7a18420d4bb85</id>
<content type='text'>
Introduce two public functions CharToUpper and AsciiCharToUpper.
They have the same functions as InternalCharToUpper and
InternalBaseLibAsciiToUpper.Considering the internal functions will
be removed,so directly I change their function names to the public ones'.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369

Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang &lt;shenglei.zhang@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/BaseLib: AsciiStrToUnicodeStr(S) not handle EASCII properly</title>
<updated>2018-10-23T00:45:00+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2018-10-19T02:29:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0dab57708de64284ac83f0632daba4d9e1cb1135'/>
<id>urn:sha1:0dab57708de64284ac83f0632daba4d9e1cb1135</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1262

Current implementation of BaseLib APIs:

AsciiStrToUnicodeStr()
AsciiStrToUnicodeStrS()
AsciiStrnToUnicodeStrS()

do not handle EASCII properly.

More specifically, if the value of ASCII character is larger than 0x7F,
then the converted Unicode character will have all '1's in the higher 8
bits.

An example:
  0xC9 =&gt; 0xFFC9 (current implementations)
and it should be:
  0xC9 =&gt; 0x00C9

This commit will address this issue.

Cc: Bin.Lain &lt;bin_601@mail2000.com.tw&gt;
Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/SafeString: Fix potential out-of-bound memory access</title>
<updated>2018-02-06T09:31:08+00:00</updated>
<author>
<name>Ruiyu Ni</name>
<email>ruiyu.ni@intel.com</email>
</author>
<published>2018-02-02T10:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=56658c22a674062e46f5bfd2d4da71a88bf3c0e5'/>
<id>urn:sha1:56658c22a674062e46f5bfd2d4da71a88bf3c0e5</id>
<content type='text'>
Today's implementation of [Ascii]StrnCpyS/[Ascii]StrnCatS calls
StrnLenS () to get the length of source string but supplies the
destination buffer size as max size.
It's a bug that may cause out-of-bound memory access.
For example:
  StrnCpyS (Dest[10], 10, "hello", 6)
  -&gt; StrnLenS ("hello", 10) //&lt; cause out-of bound memory access

In a pool guard enabled environment, when using shell to edit an
existing file which contains empty line, the page fault is met.

The patch fixes the four library functions to avoid such
out-of-bound memory access.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni &lt;ruiyu.ni@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
</feed>
