Commit 19443178 authored by Chris Wright's avatar Chris Wright Committed by David S. Miller

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: default avatarChris Wright <chrisw@sous-sol.org>
Acked-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7a1aa309
...@@ -32,7 +32,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature, ...@@ -32,7 +32,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,
if (len > 3) { if (len > 3) {
DCCP_WARN("invalid length %d\n", len); DCCP_WARN("invalid length %d\n", len);
return 1; return -EINVAL;
} }
/* XXX add further sanity checks */ /* XXX add further sanity checks */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment