public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH EDK2 v1 0/1] BaseTools/VfrCompile: add NULL point check
@ 2020-11-13  3:30 wenyi,xie
  2020-11-13  3:30 ` [PATCH EDK2 v1 1/1] " wenyi,xie
  0 siblings, 1 reply; 3+ messages in thread
From: wenyi,xie @ 2020-11-13  3:30 UTC (permalink / raw)
  To: devel; +Cc: songdongkuang, xiewenyi2

Main Changes :
add NULL point check and log after allocting.

Wenyi Xie (1):
  BaseTools/VfrCompile: add NULL point check

 BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.20.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH EDK2 v1 1/1] BaseTools/VfrCompile: add NULL point check
  2020-11-13  3:30 [PATCH EDK2 v1 0/1] BaseTools/VfrCompile: add NULL point check wenyi,xie
@ 2020-11-13  3:30 ` wenyi,xie
  0 siblings, 0 replies; 3+ messages in thread
From: wenyi,xie @ 2020-11-13  3:30 UTC (permalink / raw)
  To: devel; +Cc: songdongkuang, xiewenyi2, Bob Feng, Liming Gao, Yuwei Chen

add NULL point check after allocating.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
 BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c b/BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c
index 051ee4ec5d28..122878fc49e9 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c
@@ -1704,6 +1704,7 @@ char *s;
 	require(ua!=NULL, "cannot allocate UserAction");
 
 	ua->action = (char *) calloc(strlen(LATEXT(1))+1, sizeof(char));
+    require(ua->action!=NULL, "cannot allocate action");
 	strcpy(ua->action, s);
 	return ua;
 }
@@ -1742,6 +1743,7 @@ int altnum;
 	char *p;
 	sprintf(buf, "_blk%d_alt%d", blockid, altnum);
 	p = (char *)malloc(strlen(buf)+1);
+    require(p!=NULL, "cannot allocate buf");
 	strcpy(p, buf);
 	return p;
 }
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH EDK2 v1 0/1] BaseTools/VfrCompile: add NULL point check
@ 2020-11-13  9:45 wenyi,xie
  0 siblings, 0 replies; 3+ messages in thread
From: wenyi,xie @ 2020-11-13  9:45 UTC (permalink / raw)
  To: devel; +Cc: bob.c.feng, gaoliming, yuwei.chen, songdongkuang, xiewenyi2

Main Changes :
add NULL point check and log after allocting.

Wenyi Xie (1):
  BaseTools/VfrCompile: add NULL point check

 BaseTools/Source/C/VfrCompile/Pccts/antlr/main.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.20.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-13  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-13  3:30 [PATCH EDK2 v1 0/1] BaseTools/VfrCompile: add NULL point check wenyi,xie
2020-11-13  3:30 ` [PATCH EDK2 v1 1/1] " wenyi,xie
  -- strict thread matches above, loose matches on Subject: below --
2020-11-13  9:45 [PATCH EDK2 v1 0/1] " wenyi,xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox