Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Jarosch <thomas.jarosch@intra2net.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [intel-gpu-tools PATCH] Fix out of bounds memory access
Date: Sun, 6 Jan 2013 18:21:27 +0100	[thread overview]
Message-ID: <20130106172127.GM5737@phenom.ffwll.local> (raw)
In-Reply-To: <50D9DD31.4030601@intra2net.com>

On Tue, Dec 25, 2012 at 06:06:57PM +0100, Thomas Jarosch wrote:
> cppcheck reported:
> [tools/intel_infoframes.c:836]: (error) Width 31 given in format string
> (no. 1) is larger than destination buffer 'option[16]',
> use %15s to prevent overflowing it.
> 
> Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>

Applied, thanks for the patch.
-Daniel

> ---
>  tools/intel_infoframes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
> index 66351ac..09fdcb9 100644
> --- a/tools/intel_infoframes.c
> +++ b/tools/intel_infoframes.c
> @@ -833,7 +833,7 @@ static void change_spd_infoframe(Transcoder transcoder, char *commands)
>  	val = INREG(reg);
>  
>  	while (1) {
> -		rc = sscanf(current, "%31s%n", option, &read);
> +		rc = sscanf(current, "%15s%n", option, &read);
>  		current = &current[read];
>  		if (rc == EOF) {
>  			break;
> -- 
> 1.7.11.7
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

      reply	other threads:[~2013-01-06 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 17:06 [intel-gpu-tools PATCH] Fix out of bounds memory access Thomas Jarosch
2013-01-06 17:21 ` Daniel Vetter [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-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=20130106172127.GM5737@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.jarosch@intra2net.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