Fix parameter range check

This commit is contained in:
Jean Cyr
2013-08-30 20:24:14 -04:00
parent efca6f2cb1
commit f246b68c7b

View File

@@ -874,7 +874,7 @@ ToneAlarm::ioctl(file *filp, int cmd, unsigned long arg)
case TONE_SET_ALARM:
debug("TONE_SET_ALARM %u", arg);
if (arg <= TONE_NUMBER_OF_TUNES) {
if (arg < TONE_NUMBER_OF_TUNES) {
if (arg == 0) {
// stop the tune
_tune = nullptr;