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

On Wed, 21 Aug 2019, "Ser, Simon" <simon.ser@intel.com> wrote:
> On Wed, 2019-08-21 at 16:09 +0300, Jani Nikula wrote:
>> e points into the buffer pointer to by p.
>
> Typo: pointed

Whoops. Fixed while applying, thanks for the review.

BR,
Jani.


>
>> 
>> 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);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-08-22  7:33 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
2019-08-22  7:33   ` Jani Nikula [this message]
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=8736htejs7.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=simon.ser@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