diff options
author | Thomas Jarosch <tomj@simonv.com> | 2014-12-21 17:22:09 +0100 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2014-12-21 17:22:09 +0100 |
commit | 9a5f7ce0f2fd44ab5d78ae40f98fc4ab963517bf (patch) | |
tree | 5b8de3ed377b2ff23d9f0a695692c85c642659e4 /apps/plugins | |
parent | 29ffa832fec4a2123c10730ee6f3d6fc08e39de0 (diff) | |
download | rockbox-9a5f7ce0f2fd44ab5d78ae40f98fc4ab963517bf.tar.gz rockbox-9a5f7ce0f2fd44ab5d78ae40f98fc4ab963517bf.zip |
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
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/wavrecord.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
3669 | if (sampr[i][0] == mas) | 3669 | if (sampr[i][0] == mas) |
3670 | break; | 3670 | break; |
3671 | } | 3671 | } |
3672 | if (!(update_wav_header(filename, sampr[i][1], | 3672 | if (i == 9 || !(update_wav_header(filename, sampr[i][1], |
3673 | (reccfg.channels + 1), bytes_written))) | 3673 | (reccfg.channels + 1), bytes_written))) |
3674 | { | 3674 | { |
3675 | rb->splash(HZ, "Updating WAV header failed"); | 3675 | rb->splash(HZ, "Updating WAV header failed"); |