aboutsummaryrefslogtreecommitdiff
path: root/sound/oss/sound_config.h
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-01-03 12:39:27 +0100
committerJaroslav Kysela <perex@perex.cz>2010-01-08 09:17:51 +0100
commit444c1953d496d272208902ff7010dc70d1f887f0 (patch)
tree40aa1e10f108818b3b7d12384229c0501aeb5a12 /sound/oss/sound_config.h
parent440b004cf953bec2bc8cd91c64ae707fd7e25327 (diff)
sound: oss: off by one bug
The problem is that in the original code sound_nblocks could go up to 1024 which would be an array overflow. This was found with a static checker and has been compile tested only. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/oss/sound_config.h')
-rw-r--r--sound/oss/sound_config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h
index 55271fbe7f4..9d35c4c65b9 100644
--- a/sound/oss/sound_config.h
+++ b/sound/oss/sound_config.h
@@ -142,4 +142,6 @@ static inline int translate_mode(struct file *file)
#define TIMER_ARMED 121234
#define TIMER_NOT_ARMED 1
+#define MAX_MEM_BLOCKS 1024
+
#endif