* [intel-gpu-tools PATCH] Fix out of bounds memory access
@ 2012-12-25 17:06 Thomas Jarosch
2013-01-06 17:21 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Jarosch @ 2012-12-25 17:06 UTC (permalink / raw)
To: intel-gfx
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>
---
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 = ¤t[read];
if (rc == EOF) {
break;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [intel-gpu-tools PATCH] Fix out of bounds memory access
2012-12-25 17:06 [intel-gpu-tools PATCH] Fix out of bounds memory access Thomas Jarosch
@ 2013-01-06 17:21 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2013-01-06 17:21 UTC (permalink / raw)
To: Thomas Jarosch; +Cc: intel-gfx
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 = ¤t[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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-06 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.