Liming Gao
a7b54d1821
MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks
...
After update Oniguruma from v6.9.0 to v6.9.3, two null pointer check
should be added.
This change bases on the patch https://edk2.groups.io/g/devel/message/45183 .
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Hao A Wu <hao.a.wu@intel.com >
2019-08-13 17:05:31 +08:00
Liming Gao
b26691c471
MdeModulePkg RegularExpressionDxe: Update Oniguruma from v6.9.0 to v6.9.3
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2066
Update Oniguruma to the latest version v6.9.3.
Oniguruma https://github.com/kkos/oniguruma
This release is the security fix release. It includes the changes:
Fixed CVE-2019-13224
Fixed CVE-2019-13225
Fixed many problems (found by libfuzzer programs)
Verify VS2015, GCC5 build.
Verify RegularExpressionProtocol GetInfo() and Match() function.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Cc: Cinnamon Shia <cinnamon.shia@hpe.com >
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Hao A Wu <hao.a.wu@intel.com >
2019-08-13 17:05:24 +08:00
Michael D Kinney
9d510e61fc
MdeModulePkg: Replace BSD License with BSD+Patent License
...
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 <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com >
2019-04-09 10:58:08 -07:00
Dongao Guo
6d665168b0
MdeModulePkg/RegularExpressionDxe: Add null pointer check
...
This is the part of commit 3948c510ed
.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-16 15:24:23 +08:00
Liming Gao
2215855957
MdeModulePkg RegularExpressionDxe: Enable STDARG for variable arguments
...
Set macro for variable arguments, and remove the hard code definition
to avoid the potential duplicated definition.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Dongao Guo <dongao.guo@intel.com >
2018-10-15 15:55:54 +08:00
Dongao Guo
3948c510ed
MdeModulePkg/RegularExpressionDxe: Add null pointer check
...
There are five check not necessary in logic ,just for pass static
analysis. More detail please refer to comment in code.
And the rest changes are all accepted by owner, they are reasonable.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-15 15:55:53 +08:00
Dongao Guo
df8be9e50f
MdeModulePkg/RegularExpressionDxe: Miss null pointer check
...
Oniguruma https://github.com/kkos/oniguruma
this change is merged from oniguruma develop branch.
from commit 1db8a2726dfad0401f928cb8474bd770f07040a7.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-15 15:55:53 +08:00
Dongao Guo
a5def17714
MdeModulePkg/RegularExpressionDxe: Miss null pointer check
...
Oniguruma https://github.com/kkos/oniguruma
this change is merged from oniguruma develop branch.
from commit ea36d810f1d9b28f3ef20bd8d453bea2f7fb598b
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-15 15:55:52 +08:00
Dongao Guo
16bd7c35df
MdeModulePkg/RegularExpressionDxe: Miss null pointer check
...
Oniguruma https://github.com/kkos/oniguruma
this change is merged from oniguruma develop branch.
from commit 396a757dffafc0c7eb269433c29a0ba961d73ad6.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-15 15:55:51 +08:00
Guo, Dongao
8122c6bc8b
MdeModulePkg/RegularExpressionDxe:omit unused variable
...
comment unused variable to avoid warning,and modify inf build option.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2018-10-11 13:19:43 +08:00
Dongao Guo
b602265d55
MdeModulePkg RegularExpressionDxe: Update Oniguruma to 6.9.0
...
https://bugzilla.tianocore.org/show_bug.cgi?id=1200
Update Oniguruma to the latest version v6.9.0.
Oniguruma https://github.com/kkos/oniguruma
Verify VS2017, GCC5 build.
Verify RegularExpressionProtocol GetInfo() and Match() function.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com >
2018-09-25 08:52:51 +08:00
Song, BinX
cc063f30dc
MdeModulePkg: Delete useless case code
...
- Delete useless case code to fix /WHOLEARCHIVE build
error with VS2015 tool chain
Cc: Star Zeng <star.zeng@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bell Song <binx.song@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com >
2017-08-16 16:55:22 +08:00
Song, BinX
39bc77eb76
MdeModulePkg: Delete never touched code
...
- Delete never touched code
Cc: Star Zeng <star.zeng@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bell Song <binx.song@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com >
2017-08-16 16:55:18 +08:00
Liming Gao
a12b214ef9
MdeModulePkg RegularExpressionDxe: Add the missing EFIAPI for the function
...
The function with the variable parameters should have EFIAPI.
Cc: Feng Tian <feng.tian@intel.com >
Cc: Cinnamon Shia <cinnamon.shia@hpe.com >
Cc: Cecil Sheng <cecil.sheng@hpe.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Feng Tian <feng.tian@intel.com >
2016-10-12 20:35:21 +08:00
Laszlo Ersek
ffbb5ae3ba
MdeModulePkg: RegularExpressionDxe: support free(NULL)
...
The ISO C standard says about free(),
If ptr is a null pointer, no action occurs.
This is not true of the FreePool() interface of the MemoryAllocationLib
class:
Buffer must have been allocated on a previous call to the pool
allocation services of the Memory Allocation Library. [...] If Buffer
was not allocated with a pool allocation function in the Memory
Allocation Library, then ASSERT().
Therefore we must not forward the argument of free() to FreePool() without
checking.
Cc: Cecil Sheng <cecil.sheng@hpe.com >
Cc: Cinnamon Shia <cinnamon.shia@hpe.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Qiu Shumin <shumin.qiu@intel.com >
Cc: Samer El-Haj-Mahmoud <elhaj@hpe.com >
Cc: Yao Jiewen <Jiewen.Yao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-By: Cinnamon Shia <cinnamon.shia@hpe.com >
2016-02-26 18:30:14 +01:00
Qiu Shumin
61e078ddcb
MdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.
...
Function 'sprintf' has potential buffer overflow risk. This patch use 'sprintf_s' to improve the code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com >
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com >
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com >
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19582 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-04 05:14:53 +00:00
Qiu Shumin
fbaab71534
MdeModulePkg: Fix VS2012 build failure.
...
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com >
Reviewed-by: Feng Tian <feng.tian@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19365 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-18 05:59:10 +00:00
Samer El-Haj-Mahmoud
b2e3542666
MdeModulePkg: Fix RegularExpressionDxe memcpy intrinsic.
...
Use explicit CopyMem to resolve intrinsic memcpy errors on some compilers.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com >
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19292 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 02:46:53 +00:00
Qiu Shumin
b0c2b79738
MdeModulePkg: Add NULL pointer check for RegularExpressionDxe.
...
Refine code by adding NULL pointer check to avoid potential NULL pointer dereferenced.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com >
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19271 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 08:40:55 +00:00
Liming Gao
4d454c54d1
MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxe
...
warning C4311: pointer truncation from 'void *' to 'unsigned long'
warning C4312: conversion from 'unsigned long' to 'void *' of greater size
Update code to convert type to UINTN first, then convert it to other type.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com >
Acked-by: Michael Kinney <michael.d.kinney@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19114 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04 03:15:08 +00:00
Liming Gao
d76946e328
MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxe
...
warning C4456: declaration of 'q' hides previous local declaration.
Update code to use the different local variable name.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com >
Acked-by: Michael Kinney <michael.d.kinney@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19113 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04 03:14:14 +00:00
Cinnamon Shia
0af8e57c74
MdeModulePkg/RegularExpressionDxe: Correct copyright
...
Correct copyrights in RegularExpressionDxe
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com >
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18720 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-03 02:43:03 +00:00
Cecil Sheng
ddd097e33f
Fixed GCC tool chain build fail.
...
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18419 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-09 06:29:14 +00:00
Cecil Sheng
14b0e5781b
MdeModulePkg: Regular expression protocol
...
Add driver to produce EFI_REGULAR_EXPRESSION_PROTOCOL. Based on
Oniguruma v5.9.6 (BSD 2-clause license), which provides full Unicode
support, and POSIX ERE and Perl regex syntaxes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18413 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 07:10:03 +00:00
Eric Dong
d8062f1573
Rollback the patch which has error changes.
...
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18412 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 07:04:28 +00:00
Cecil Sheng
db3b92b40e
MdeModulePkg: Regular expression protocol
...
Add driver to produce EFI_REGULAR_EXPRESSION_PROTOCOL. Based on
Oniguruma v5.9.6 (BSD 2-clause license), which provides full Unicode
support, and POSIX ERE and Perl regex syntaxes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18411 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 06:49:47 +00:00