diff options
author | Chris Wright <chrisw@sous-sol.org> | 2008-05-05 13:50:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-15 07:50:03 -0700 |
commit | f96e856cd870007bb8f344e62eff228eba3f6989 (patch) | |
tree | 82d9234b165133ae92711e06a7511a50c649bf65 /net | |
parent | dbfda7d328029421c1126423646e602c553ea2a2 (diff) |
dccp: return -EINVAL on invalid feature length
[ Upstream commit: 19443178fbfbf40db15c86012fc37df1a44ab857 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 4a4f6ce4498..933a0ecf8d4 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, if (len > 3) { DCCP_WARN("invalid length %d\n", len); - return 1; + return -EINVAL; } /* XXX add further sanity checks */ |