diff options
author | Chris Wright <chrisw@sous-sol.org> | 2008-05-05 16:50:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-05 16:50:24 -0400 |
commit | 19443178fbfbf40db15c86012fc37df1a44ab857 (patch) | |
tree | e41cd59c5e6aba6f5ca932c9131f73e563b02bf8 /net | |
parent | 7a1aa309f21ea2f6c31f364341e4027ecf4e79bc (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/feat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/feat.c b/net/dccp/feat.c index 4a4f6ce4498d..933a0ecf8d46 100644 --- a/net/dccp/feat.c +++ b/net/dccp/feat.c | |||
@@ -32,7 +32,7 @@ int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature, | |||
32 | 32 | ||
33 | if (len > 3) { | 33 | if (len > 3) { |
34 | DCCP_WARN("invalid length %d\n", len); | 34 | DCCP_WARN("invalid length %d\n", len); |
35 | return 1; | 35 | return -EINVAL; |
36 | } | 36 | } |
37 | /* XXX add further sanity checks */ | 37 | /* XXX add further sanity checks */ |
38 | 38 | ||