Re: [ovs-dev] [PATCH] oss-fuzz: Use unsigned for left shift in ofctl_parse_flows__

2018-11-02 Thread Ben Pfaff
On Thu, Nov 01, 2018 at 11:51:21AM -0700, Yifeng Sun wrote: > Left shift int (1 here) can result in a negative value. This is an undefined > behavior according to ISO C99 (6.5.7). > > The error message reported by oss-fuzz is: > runtime error: left shift of 1 by 31 places cannot be represented in

[ovs-dev] [PATCH] oss-fuzz: Use unsigned for left shift in ofctl_parse_flows__

2018-11-01 Thread Yifeng Sun
Left shift int (1 here) can result in a negative value. This is an undefined behavior according to ISO C99 (6.5.7). The error message reported by oss-fuzz is: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' This patch fixes it by changing signed int to unsigned in