From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <error27@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
Srinivasa Deevi <srinivasa.deevi@conexant.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] cx231xx: card->driver "Conexant cx231xx Audio" too long
Date: Mon, 22 Mar 2010 14:46:06 +0000 [thread overview]
Message-ID: <s5hr5ncxvm9.wl%tiwai@suse.de> (raw)
In-Reply-To: <20100319114957.GQ5331@bicker>
At Fri, 19 Mar 2010 14:49:57 +0300,
Dan Carpenter wrote:
>
> card->driver is 15 characters and a NULL, the original code could
> cause a buffer overflow.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
This should rather a string without spaces because this string is used
as an identifier in alsa-lib.
Better to use "Cx231xx" or "Cx231xx-Audio".
Takashi
>
> diff --git a/drivers/media/video/cx231xx/cx231xx-audio.c b/drivers/media/video/cx231xx/cx231xx-audio.c
> index 7793d60..b3282ae 100644
> --- a/drivers/media/video/cx231xx/cx231xx-audio.c
> +++ b/drivers/media/video/cx231xx/cx231xx-audio.c
> @@ -495,7 +495,7 @@ static int cx231xx_audio_init(struct cx231xx *dev)
> pcm->info_flags = 0;
> pcm->private_data = dev;
> strcpy(pcm->name, "Conexant cx231xx Capture");
> - strcpy(card->driver, "Conexant cx231xx Audio");
> + strcpy(card->driver, "Cx231xx Audio");
> strcpy(card->shortname, "Cx231xx Audio");
> strcpy(card->longname, "Conexant cx231xx Audio");
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
next prev parent reply other threads:[~2010-03-22 14:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 11:49 [patch] cx231xx: card->driver "Conexant cx231xx Audio" too long Dan Carpenter
2010-03-22 14:46 ` Takashi Iwai [this message]
2010-03-22 15:39 ` [patch v2] " Dan Carpenter
2010-03-22 15:43 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too Joe Perches
2010-03-22 16:04 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too long Takashi Iwai
2010-03-22 16:54 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too Dan Carpenter
2010-03-22 16:57 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too long Takashi Iwai
2010-03-23 16:43 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too Marcin Slusarz
2010-03-22 17:18 ` walter harms
2010-03-22 17:21 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too long Takashi Iwai
2010-03-22 17:50 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too walter harms
2010-03-23 6:59 ` [patch v2] cx231xx: card->driver "Conexant cx231xx Audio" too long Takashi Iwai
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=s5hr5ncxvm9.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=srinivasa.deevi@conexant.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