From cda8bee056c71acd01b2a70258f99d43ba826198 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Tue, 25 Dec 2012 18:06:57 +0100 Subject: [PATCH] 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 Signed-off-by: Daniel Vetter --- 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; -- 2.7.4