ALSA: Use strlcpy() instead of strncpy()
We tend to make stupid mistakes with strncpy(). Let's take a safer one, strlcpy(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -185,7 +185,7 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
|
||||
goto err;
|
||||
|
||||
card->dev = &dev->dev;
|
||||
strncpy(card->driver, dev->dev.driver->name, sizeof(card->driver));
|
||||
strlcpy(card->driver, dev->dev.driver->name, sizeof(card->driver));
|
||||
|
||||
ret = pxa2xx_pcm_new(card, &pxa2xx_ac97_pcm_client, &pxa2xx_ac97_pcm);
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user