All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/3] runner/resultgen: Don't pass NULL to str*() functions
Date: Thu, 20 Jun 2019 15:33:51 +0300	[thread overview]
Message-ID: <20190620123351.GH22949@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190620122902.20761-2-arkadiusz.hiler@intel.com>

On Thu, Jun 20, 2019 at 03:29:01PM +0300, Arkadiusz Hiler wrote:
> If we don't get values from the JSON strlen() and strcmp() on them would
> dereference NULL pointer.
> 
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>


Reviewed-by: Petri Latvala <petri.latvala@intel.com>


> ---
>  runner/resultgen.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/runner/resultgen.c b/runner/resultgen.c
> index 7b4cd519..58b95220 100644
> --- a/runner/resultgen.c
> +++ b/runner/resultgen.c
> @@ -866,7 +866,7 @@ static void fill_from_journal(int fd,
>  
>  static void override_result_single(struct json_object *obj)
>  {
> -	const char *errtext = NULL, *result = NULL;
> +	const char *errtext = "", *result = "";
>  	struct json_object *textobj;
>  	bool dmesgwarns = false;
>  
> -- 
> 2.21.0
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-06-20 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 12:29 [igt-dev] [PATCH i-g-t 1/3] runner/executor: Make sure that intervals_left is always initialized Arkadiusz Hiler
2019-06-20 12:29 ` [igt-dev] [PATCH i-g-t 2/3] runner/resultgen: Don't pass NULL to str*() functions Arkadiusz Hiler
2019-06-20 12:33   ` Petri Latvala [this message]
2019-06-20 12:29 ` [igt-dev] [PATCH i-g-t 3/3] runner/settings: Be consistent with empty blacklist Arkadiusz Hiler
2019-06-20 12:34   ` Petri Latvala
2019-06-20 12:33 ` [igt-dev] [PATCH i-g-t 1/3] runner/executor: Make sure that intervals_left is always initialized Petri Latvala
2019-06-20 16:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2019-06-20 19:15 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20190620123351.GH22949@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.