Re: [PATCH libnetfilter_conntrack 2/2] conntrack: simplify calculation of `struct sock_fprog` length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 23, 2022 at 04:24:41PM +0000, Jeremy Sowden wrote:
> When assigning the length to the `struct sock_fprog` object, we
> calculate it by multiplying the number of `struct sock_filter` objects,
> `j`, by `sizeof(struct sock_filter)` and then dividing by
> `sizeof(bsf[0])`, which, since `bsf[0]` is a `struct sock_filter`, is
> equal to `sizeof(struct sock_filter)`.
> 
> Remove the `sizeof` expressions and just assign `j`.

Also applied, thanks



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux