浏览代码

sound: serial-u16550: fix buffer overflow

Remove most of the serial port parameters from the card longname string
because it was way too long and overflowed into the mixername string.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch 16 年之前
父节点
当前提交
bd0185ceac
共有 1 个文件被更改,包括 3 次插入8 次删除
  1. 3 8
      sound/drivers/serial-u16550.c

+ 3 - 8
sound/drivers/serial-u16550.c

@@ -963,16 +963,11 @@ static int __devinit snd_serial_probe(struct platform_device *devptr)
 	if (err < 0)
 	if (err < 0)
 		goto _err;
 		goto _err;
 
 
-	sprintf(card->longname, "%s at 0x%lx, irq %d speed %d div %d outs %d ins %d adaptor %s droponfull %d",
+	sprintf(card->longname, "%s [%s] at %#lx, irq %d",
 		card->shortname,
 		card->shortname,
-		uart->base,
-		uart->irq,
-		uart->speed,
-		(int)uart->divisor,
-		outs[dev],
-		ins[dev],
 		adaptor_names[uart->adaptor],
 		adaptor_names[uart->adaptor],
-		uart->drop_on_full);
+		uart->base,
+		uart->irq);
 
 
 	snd_card_set_dev(card, &devptr->dev);
 	snd_card_set_dev(card, &devptr->dev);