From 9a5f7ce0f2fd44ab5d78ae40f98fc4ab963517bf Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Sun, 21 Dec 2014 17:22:09 +0100 Subject: wavrecord plugin: Add harmless sanity check cppcheck reported: [rockbox/apps/plugins/wavrecord.c:3672]: (error) Array 'sampr[9][2]' index sampr[9][1] out of bounds. Change-Id: Ib1e9c25842aa275b15d8d817018cc523269b1f42 --- apps/plugins/wavrecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/plugins/wavrecord.c b/apps/plugins/wavrecord.c index 5cdf4fdb29..f7467b5b5e 100644 --- a/apps/plugins/wavrecord.c +++ b/apps/plugins/wavrecord.c @@ -3669,7 +3669,7 @@ static int record_file(char *filename) if (sampr[i][0] == mas) break; } - if (!(update_wav_header(filename, sampr[i][1], + if (i == 9 || !(update_wav_header(filename, sampr[i][1], (reccfg.channels + 1), bytes_written))) { rb->splash(HZ, "Updating WAV header failed"); -- cgit v1.2.3