From bb690c9e2702e49af3be2fb6f03d9b60e0afcab7 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 29 Sep 2011 09:10:48 +0300 Subject: sound: oss: use strlcpy() in sound_timer_init() sound_timer.info.name is a 32 character buffer. This function only has one caller (in sound/oss/ad1848.c) and it passes as 128 character buffer as "name". I don't know if this is a problem in real life, and I doubt we're going to add more OSS drivers so it's unlikely to become an issue. But we may as well take care of it. Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- sound/oss/sound_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/oss/sound_timer.c b/sound/oss/sound_timer.c index 48cda6c4c257..8021c85f076d 100644 --- a/sound/oss/sound_timer.c +++ b/sound/oss/sound_timer.c @@ -320,7 +320,7 @@ void sound_timer_init(struct sound_lowlev_timer *t, char *name) n = sound_alloc_timerdev(); if (n == -1) n = 0; /* Overwrite the system timer */ - strcpy(sound_timer.info.name, name); + strlcpy(sound_timer.info.name, name, sizeof(sound_timer.info.name)); sound_timer_devs[n] = &sound_timer; } EXPORT_SYMBOL(sound_timer_init); -- cgit v1.2.3