Message ID | 1405612854-10638-1-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/sound/core/control.c b/sound/core/control.c index f149a5eab093..acd92ffb2bc2 100644 --- a/sound/core/control.c +++ b/sound/core/control.c @@ -278,6 +278,10 @@ static unsigned int snd_ctl_hole_check(struct snd_card *card, { struct snd_kcontrol *kctl; + /* Make sure that the ids assigned to the control do not wrap around */ + if (card->last_numid >= UINT_MAX - count) + card->last_numid = 0; + list_for_each_entry(kctl, &card->controls, list) { if ((kctl->id.numid <= card->last_numid && kctl->id.numid + kctl->count > card->last_numid) ||