]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: use snprintf instead of sprintf in device_list() HEAD master
authorNishant Kumar Singh <nishantsingh2jan1998@gmail.com>
Fri, 10 Apr 2026 02:58:12 +0000 (02:58 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sat, 11 Apr 2026 08:08:52 +0000 (10:08 +0200)
commite731e5a7c7f662154ff8f509343a8b9a0cbd87b5
tree94215631d3d1df1a3c4bbf6172ebc6bd596838b8
parented63d017e0e94dbae9223caf0dae94fc94db18ca
aplay: use snprintf instead of sprintf in device_list()

sprintf() does not perform bounds checking. Replace it with snprintf()
using sizeof(name) to follow safer coding practices and make the buffer
size explicit, consistent with how similar fixes have been applied
elsewhere in the codebase

Signed-off-by: Nishant Kumar Singh <nishantsingh2jan1998@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c