summaryrefslogtreecommitdiff
path: root/tools/intel_infoframes.c
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2012-12-25 18:06:57 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-06 18:20:47 +0100
commitcda8bee056c71acd01b2a70258f99d43ba826198 (patch)
tree13e30368e747ca10f6d04ea72eccbf2b08e5f1d5 /tools/intel_infoframes.c
parent05bfbf422723fbb6c6e085e9b7f1bdb41afab7c8 (diff)
Fix out of bounds memory access
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> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tools/intel_infoframes.c')
-rw-r--r--tools/intel_infoframes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/intel_infoframes.c b/tools/intel_infoframes.c
index 66351ac2..09fdcb97 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;