Skip to content

Commit

Permalink
Merge branch 'fix/oss' into for-linus
Browse files Browse the repository at this point in the history
* fix/oss:
  sound: mpu401.c: Buffer overflow
  sound: aedsp16: Buffer overflow
  • Loading branch information
tiwai committed Jul 31, 2009
2 parents d62e345 + a987004 commit ec86fe5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions sound/oss/aedsp16.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/*
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion sound/oss/mpu401.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ec86fe5

Please sign in to comment.