Path: blob/main/net-mgmt/aggregate/files/patch-aggregate.c
18157 views
Index: aggregate.c1===================================================================2--- aggregate.c (revision 919)3+++ aggregate.c (working copy)4@@ -261,8 +261,18 @@5moanf(0, "[line %d] line too long; ignoring line", line);6continue;7}8+ if (buf[i] == '/') {9+ masklen = atoi(buf + i + 1);10+ if (masklen < 1 || masklen > max_prefix_length)11+ {12+ if (!quiet)13+ moanf(0, "[line %d] mask length %d out of range; ignoring line", \14+ line, masklen);15+ continue;16+ }17+ } else18+ masklen = default_prefix_length;19buf[i] = 0;20- masklen = default_prefix_length;21} else {22i = 0;23while (buf[i] != '/' && i < MAX_buf) i++;242526