Skip to contentSkip to conversation

em28xx: "Empia Em28xx Audio" too long

PATCH Superseded Dan Carpenter 1 participant 2 messages Mar 19, 2010 – Mar 23, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 em28xx: "Empia Em28xx Audio" too long

card->driver is 15 characters and a NULL. The original code goes past the end of the array.

drivers/media/video/em28xx/em28xx-audio.c +1 -1
index bd78338..530df0a 100644
@@ -491,7 +491,7 @@ static int em28xx_audio_init(struct em28xx *dev)
 	strcpy(pcm->name, "Empia 28xx Capture");
 
 	snd_card_set_dev(card, &dev->udev->dev);
-	strcpy(card->driver, "Empia Em28xx Audio");
+	strcpy(card->driver, "Em28xx Audio");
 	strcpy(card->shortname, "Em28xx Audio");
 	strcpy(card->longname, "Empia Em28xx Audio");
 
#1 lore raw

PATCH v2 1/1 em28xx: "Empia Em28xx Audio" too long

card->driver is 15 characters and a NULL. The original code goes past the end of the array.

---
V2: Takashi Iwai asked me to change the space to a hyphen since this is used as an identifier in alsa-lib.

drivers/media/video/em28xx/em28xx-audio.c +1 -1
index bd78338..e182abf 100644
@@ -491,7 +491,7 @@ static int em28xx_audio_init(struct em28xx *dev)
 	strcpy(pcm->name, "Empia 28xx Capture");
 
 	snd_card_set_dev(card, &dev->udev->dev);
-	strcpy(card->driver, "Empia Em28xx Audio");
+	strcpy(card->driver, "Em28xx-Audio");
 	strcpy(card->shortname, "Em28xx Audio");
 	strcpy(card->longname, "Empia Em28xx Audio");