aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-31 10:17:45 +0200
committerTakashi Iwai <tiwai@suse.de>2009-07-31 10:17:45 +0200
commitec86fe5209ef991e93b5d391e74954ea9d827c50 (patch)
tree9d2502dfb8da0533dfd5005f78f9f21edaf378f8 /sound
parentd62e345f142ba271d9dab2b2e6cb5070cae94754 (diff)
parenta987004fbcf163b100d227284999602f83044d7e (diff)
downloadkernel_samsung_smdk4412-ec86fe5209ef991e93b5d391e74954ea9d827c50.zip
kernel_samsung_smdk4412-ec86fe5209ef991e93b5d391e74954ea9d827c50.tar.gz
kernel_samsung_smdk4412-ec86fe5209ef991e93b5d391e74954ea9d827c50.tar.bz2
Merge branch 'fix/oss' into for-linus
* fix/oss: sound: mpu401.c: Buffer overflow sound: aedsp16: Buffer overflow
Diffstat (limited to 'sound')
-rw-r--r--sound/oss/aedsp16.c9
-rw-r--r--sound/oss/mpu401.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c
index 3ee9900..35b5912 100644
--- a/sound/oss/aedsp16.c
+++ b/sound/oss/aedsp16.c
@@ -325,8 +325,9 @@
/*
* Size of character arrays that store name and version of sound card
*/
-#define CARDNAMELEN 15 /* Size of the card's name in chars */
-#define CARDVERLEN 2 /* Size of the card's version in chars */
+#define CARDNAMELEN 15 /* Size of the card's name in chars */
+#define CARDVERLEN 10 /* Size of the card's version in chars */
+#define CARDVERDIGITS 2 /* Number of digits in the version */
#if defined(CONFIG_SC6600)
/*
@@ -410,7 +411,7 @@
static int soft_cfg __initdata = 0; /* bitmapped config */
static int soft_cfg_mss __initdata = 0; /* bitmapped mss config */
-static int ver[CARDVERLEN] __initdata = {0, 0}; /* DSP Ver:
+static int ver[CARDVERDIGITS] __initdata = {0, 0}; /* DSP Ver:
hi->ver[0] lo->ver[1] */
#if defined(CONFIG_SC6600)
@@ -957,7 +958,7 @@ static int __init aedsp16_dsp_version(int port)
* string is finished.
*/
ver[len++] = ret;
- } while (len < CARDVERLEN);
+ } while (len < CARDVERDIGITS);
sprintf(DSPVersion, "%d.%d", ver[0], ver[1]);
DBG(("success.\n"));
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c
index 1b2316f..734b8f9 100644
--- a/sound/oss/mpu401.c
+++ b/sound/oss/mpu401.c
@@ -1074,7 +1074,7 @@ int attach_mpu401(struct address_info *hw_config, struct module *owner)
sprintf(mpu_synth_info[m].name, "%s (MPU401)", hw_config->name);
else
sprintf(mpu_synth_info[m].name,
- "MPU-401 %d.%d%c Midi interface #%d",
+ "MPU-401 %d.%d%c MIDI #%d",
(int) (devc->version & 0xf0) >> 4,
devc->version & 0x0f,
revision_char,