diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c index 05817c55692f0a2db4d027b6d6510ca6dc8edd18..0afd9187f836aca5880d026ebff3b6bdaac37199 100644 --- a/net/sched/sch_ets.c +++ b/net/sched/sch_ets.c @@ -91,6 +91,8 @@ ets_class_from_arg(struct Qdisc *sch, unsigned long arg) { struct ets_sched *q = qdisc_priv(sch); + if (arg == 0 || arg > q->nbands) + return NULL; return &q->classes[arg - 1]; }