From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] mpu401.c: Buffer overflow Date: Wed, 29 Jul 2009 14:44:34 +0200 Message-ID: References: <4A702079.4080304@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id E5891103814 for ; Wed, 29 Jul 2009 14:44:36 +0200 (CEST) In-Reply-To: <4A702079.4080304@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Roel Kluin Cc: alsa-devel@alsa-project.org, Andrew Morton List-Id: alsa-devel@alsa-project.org 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 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, >