public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Gao, Liming" <liming.gao@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Wang, Jian J" <jian.j.wang@intel.com>
Subject: Re: [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks
Date: Mon, 12 Aug 2019 05:08:09 +0000	[thread overview]
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A093C9188E2@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1565578338-10404-1-git-send-email-liming.gao@intel.com>

> -----Original Message-----
> From: Gao, Liming
> Sent: Monday, August 12, 2019 10:52 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A
> Subject: [Patch] 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>
> ---
>  MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c |
> 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git
> a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c
> b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c
> index 4605d40bd1..2b121690e1 100644
> ---
> a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c
> +++
> b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c
> @@ -1955,6 +1955,7 @@ callout_tag_entry(ScanEnv* env, regex_t* reg,
> UChar* name, UChar* name_end,
> 
>    ext = onig_get_regex_ext(reg);
>    CHECK_NULL_RETURN_MEMERR(ext);
> +  CHECK_NULL_RETURN_MEMERR(ext->tag_table);
>    r = callout_tag_entry_raw(env, ext->tag_table, name, name_end,
> entry_val);
> 
>    e = onig_reg_callout_list_at(reg, (int )entry_val);
> @@ -3277,6 +3278,7 @@ node_new_str_raw_char(UChar c)
> 
>    p[0] = c;
>    node = node_new_str_raw(p, p + 1);
> +  CHECK_NULL_RETURN(node);


Reviewed-by: Hao A Wu <hao.a.wu@intel.com>

Best Regards,
Hao Wu


> 
>    /* clear buf tail */
>    for (i = 1; i < NODE_STRING_BUF_SIZE; i++)
> --
> 2.13.0.windows.1


      reply	other threads:[~2019-08-12  5:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12  2:52 [Patch] MdeModulePkg/RegularExpressionDxe: Add two missing null pointer checks Liming Gao
2019-08-12  5:08 ` Wu, Hao A [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B80AF82E9BFB8E4FBD8C89DA810C6A093C9188E2@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox