]> git.alsa-project.org Git - alsa-utils.git/commit
alsactl: sprintf to snprintf prevent buffer overflow
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 1 May 2013 16:30:26 +0000 (11:30 -0500)
committerTakashi Iwai <tiwai@suse.de>
Mon, 6 May 2013 08:55:07 +0000 (10:55 +0200)
commit888275e66cad77c99c747af5cc5dc981059d0078
tree887f7771aa052e142eb1413fbf550e94884bae62
parentb4f34ac26037c10ac51c4bb29203500165848977
alsactl: sprintf to snprintf prevent buffer overflow

sprintf() is a bit dangerous unless you explicitly know your type size
and want to keep it in sync always. Its safer to just use snprintf() and
ensure your string doesn't overflow and is NULL terminated.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
alsactl/lock.c