parent
2f3c04227e
commit
a8b303cc3f
|
|
@ -1,3 +1,7 @@
|
||||||
|
2005-02-07 Stephen Hemminger <shemminger@dxpl.pdx.osdl.net>
|
||||||
|
|
||||||
|
* Validate classid is not too large to cause loss of bits.
|
||||||
|
|
||||||
2005-02-07 Jean-Marc Ranger <jmranger@sympatico.ca>
|
2005-02-07 Jean-Marc Ranger <jmranger@sympatico.ca>
|
||||||
|
|
||||||
* need to call getline() with null for first usage
|
* need to call getline() with null for first usage
|
||||||
|
|
|
||||||
|
|
@ -61,11 +61,15 @@ int get_tc_classid(__u32 *h, const char *str)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (*p == ':') {
|
if (*p == ':') {
|
||||||
|
if (maj >= (1<<16))
|
||||||
|
return -1;
|
||||||
maj <<= 16;
|
maj <<= 16;
|
||||||
str = p+1;
|
str = p+1;
|
||||||
min = strtoul(str, &p, 16);
|
min = strtoul(str, &p, 16);
|
||||||
if (*p != 0)
|
if (*p != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
if (min >= (1<<16))
|
||||||
|
return -1;
|
||||||
maj |= min;
|
maj |= min;
|
||||||
} else if (*p != 0)
|
} else if (*p != 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue