Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: alsa-devel@alsa-project.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mpu401.c: Buffer overflow
Date: Wed, 29 Jul 2009 14:44:34 +0200	[thread overview]
Message-ID: <s5h63dbwte5.wl%tiwai@suse.de> (raw)
In-Reply-To: <4A702079.4080304@gmail.com>

At Wed, 29 Jul 2009 12:12:09 +0200,
Roel Kluin wrote:
> 
> mpu_synth_info[m].name is a char[30], and the minimum length of the data
> written by sprintf is 31 bytes including terminating null.
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Applied now.  Thanks.


Takashi

> ---
> Found with Parfait, http://research.sun.com/projects/parfait/
> 
> 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,
> 

      reply	other threads:[~2009-07-29 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 10:12 [PATCH] mpu401.c: Buffer overflow Roel Kluin
2009-07-29 12:44 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h63dbwte5.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=roel.kluin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox