Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netfilter: nfnetlink_hook: fix check for snprintf() overflow
The kernel version of snprintf() can't return negatives. The "ret > (int)sizeof(sym)" check is off by one because and it should be >=. Finally, we need to set a negative error code. Fixes: e2cf17d ("netfilter: add new hook nfnl subsystem") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Florian Westphal <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
- Loading branch information