ALSA: hdsp: silence a sprinft() overflow warning
card->shortname is a 32 char string so the sprintf() can theoretically overflow. snd_rawmidi_new() can accept strings up to 64 bytes long. I have made the temporay buf[] array 40 bytes long and changed the sprintf() to snprintf(). Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Showing
想要评论请 注册 或 登录