public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ser, Simon" <simon.ser@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] tools/intel_reg: fix use-after-free bug in register spec read
Date: Wed, 21 Aug 2019 13:40:17 +0000	[thread overview]
Message-ID: <cd7d5ae437e5ffcff9ac929a033468ba20b2effd.camel@intel.com> (raw)
In-Reply-To: <20190821130928.29640-1-jani.nikula@intel.com>

On Wed, 2019-08-21 at 16:09 +0300, Jani Nikula wrote:
> e points into the buffer pointer to by p.

Typo: pointed

> 
> Fixes: dfda0b6aecce ("intel_reg: introduce one intel_reg tool to rule them all")
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Simon Ser <simon.ser@intel.com>

> ---
>  tools/intel_reg_spec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/intel_reg_spec.c b/tools/intel_reg_spec.c
> index 0df69b6884de..5ab56ec1a31f 100644
> --- a/tools/intel_reg_spec.c
> +++ b/tools/intel_reg_spec.c
> @@ -233,9 +233,9 @@ static int parse_line(struct reg *reg, const char *line)
>  			reg->name = p;
>  		} else if (i == 2) {
>  			reg->addr = strtoul(p, &e, 16);
> -			free(p);
>  			if (*e)
>  				ret = -1;
> +			free(p);
>  		} else if (i == 3) {
>  			ret = parse_port_desc(reg, p);
>  			free(p);
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-08-21 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-21 13:09 [igt-dev] [PATCH i-g-t] tools/intel_reg: fix use-after-free bug in register spec read Jani Nikula
2019-08-21 13:40 ` Ser, Simon [this message]
2019-08-22  7:33   ` Jani Nikula
2019-08-21 13:50 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-08-22  1:23 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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-all 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=cd7d5ae437e5ffcff9ac929a033468ba20b2effd.camel@intel.com \
    --to=simon.ser@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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