]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: Limit VUMeter progress bar to 100 for negative as well
authorRosen Penev <rosenp@gmail.com>
Wed, 20 Nov 2019 19:13:55 +0000 (11:13 -0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 20 Nov 2019 21:01:26 +0000 (22:01 +0100)
commitc9dc401264ad3c0b621f52e8098e7c1661c50cea
tree78043d442f3474b806dc29266303837c712d721c
parentac82b651676303e0689b1c23ad72aaf7b264ce5f
aplay: Limit VUMeter progress bar to 100 for negative as well

While the progress bar cannot be negative, GCC concludes that it can be
and assumes tmp can be written past the end. Fixes this GCC warning:

aplay.c:1747:18: warning: '%02d' directive writing between 2 and 11 bytes
 into a region of size 4 [-Wformat-overflow=]
 1747 |    sprintf(tmp, "%02d%%", maxperc[c]);

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c