From: Lai Peter Jun Ann Date: Thu, 17 Nov 2022 05:33:17 +0000 (+0800) Subject: tc_util: Fix no error return when large parent id used X-Git-Tag: v6.1.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0ecee3a33af57e01fe5d15f1a436216412f2d96;p=thirdparty%2Fiproute2.git tc_util: Fix no error return when large parent id used This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by stroul() is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue. Signed-off-by: Muhammad Husaini Zulkifli Signed-off-by: Lai Peter Jun Ann Signed-off-by: Stephen Hemminger --- diff --git a/tc/tc_util.c b/tc/tc_util.c index 44137adbf..334334db6 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -93,7 +93,7 @@ ok: int get_tc_classid(__u32 *h, const char *str) { - __u32 maj, min; + unsigned long maj, min; char *p; maj = TC_H_ROOT;