diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-02-14 22:45:59 +0100 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-04-17 16:16:17 -0400 |
commit | c95610ef5cf44dcef45434ca6de0832aa9b02708 (patch) | |
tree | 285c2bbac3f458ff36958d7443421016d61f7055 /sound/usb/caiaq/audio.c | |
parent | 7eab63eb262398e1e3b94dee3cc7f96b9ca92abe (diff) |
ALSA: caiaq - Fix possible string-buffer overflow
commit eaae55dac6b64c0616046436b294e69fc5311581 upstream
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.
Reported-by: Rafa <rafa@mwrinfosecurity.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'sound/usb/caiaq/audio.c')
-rw-r--r-- | sound/usb/caiaq/audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c index 4328cad6c3a2..a184e9138204 100644 --- a/sound/usb/caiaq/audio.c +++ b/sound/usb/caiaq/audio.c @@ -640,7 +640,7 @@ int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *dev) } dev->pcm->private_data = dev; - strcpy(dev->pcm->name, dev->product_name); + strlcpy(dev->pcm->name, dev->product_name, sizeof(dev->pcm->name)); memset(dev->sub_playback, 0, sizeof(dev->sub_playback)); memset(dev->sub_capture, 0, sizeof(dev->sub_capture)); |