On Sat, Apr 15, 2023 at 11:21:50PM +0800, James Raphael Tiovalen wrote: > This commit adds a check in the functions `shash_count`, `simap_count`, > and `smap_count` to return 0 if the corresponding input struct pointer > is NULL or if the corresponding hmap is empty. > > This ensures that if the return values of `shash_sort`, `simap_sort`, > or `smap_sort` are NULL, then the following for loops would not attempt > to access the pointer, which might result in segmentation faults or > undefined behavior. > > Signed-off-by: James Raphael Tiovalen <[email protected]>
Reviewed-by: Simon Horman <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
