From ce0ceb554cabf5513bf5cc3d4e89e41a3960a87f Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Thu, 15 Jun 2017 23:09:03 +0300 Subject: [PATCH] regexec: check xmalloc return value "Unchecked return value of 'xmalloc' that is later used and can result in undefined behaviour." Id: 15 Signed-off-by: Ruslan Kuprieiev --- src/regexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/regexec.c b/src/regexec.c index 09b3a39..f410a1f 100644 --- a/src/regexec.c +++ b/src/regexec.c @@ -240,6 +240,7 @@ onig_region_new(void) OnigRegion* r; r = (OnigRegion* )xmalloc(sizeof(OnigRegion)); + CHECK_NULL_RETURN(r); onig_region_init(r); return r; } -- 2.40.0