mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
dccp: return -EINVAL on invalid feature length
dccp_feat_change() validates length and on error is returning 1. This happens to work since call chain is checking for 0 == success, but this is returned to userspace, so make it a real error value. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7a1aa309f2
commit
19443178fb
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,
|
|||
|
||||
if (len > 3) {
|
||||
DCCP_WARN("invalid length %d\n", len);
|
||||
return 1;
|
||||
return -EINVAL;
|
||||
}
|
||||
/* XXX add further sanity checks */
|
||||
|
||||
|
|
Loading…
Reference in a new issue