OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sch_netem: fix a divide by zero in tabledist()
[sagit-ice-cold/kernel_xiaomi_msm8998.git]
/
net
/
sched
/
sch_netem.c
diff --git
a/net/sched/sch_netem.c
b/net/sched/sch_netem.c
index
7acf1f2
..
2a43162
100644
(file)
--- a/
net/sched/sch_netem.c
+++ b/
net/sched/sch_netem.c
@@
-713,7
+713,7
@@
static int get_dist_table(struct Qdisc *sch, const struct nlattr *attr)
int i;
size_t s;
- if (n > NETEM_DIST_MAX)
+ if (
!n ||
n > NETEM_DIST_MAX)
return -EINVAL;
s = sizeof(struct disttable) + n * sizeof(s16);