diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-10-04 09:29:39 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-10-04 08:47:52 +0200 |
commit | f92766bc8948f978a838a5607bea95804c8dfdfe (patch) | |
tree | 0055886a238f44c78097b184bfdc4992ac437847 /include/sound/asound.h | |
parent | a0978e8039f1b1bfb9fbc68f682b14313bb4f9ad (diff) | |
download | op-kernel-dev-f92766bc8948f978a838a5607bea95804c8dfdfe.zip op-kernel-dev-f92766bc8948f978a838a5607bea95804c8dfdfe.tar.gz |
ALSA: oss-mixer - use strlcpy() instead strcpy()
This is mostly a static checker fix more than anything else. We're
copying from a 64 char buffer into a 44 char buffer.
The 64 character buffer is str[] in snd_mixer_oss_build_test_all().
The call tree is:
snd_mixer_oss_build_test_all()
-> snd_mixer_oss_build_test()
-> snd_mixer_oss_build_test().
We never actually do fill str[] buffer all the way to 64 characters.
The longest string is:
sprintf(str, "%s Playback Switch", ptr->name);
ptr->name is a 32 character buffer so 32 plus 16 characters for
" Playback Switch" still puts us over the 44 limit from "id.name".
Most likely ptr->name never gets filled to the limit, but we can't
really change the size of that buffer so lets just use strlcpy() here
and be safe.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/asound.h')
0 files changed, 0 insertions, 0 deletions