Commit 19443178fbfbf40db15c86012fc37df1a44ab857

Authored by Chris Wright
Committed by David S. Miller
1 parent 7a1aa309f2

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -32,7 +32,7 @@
32 32  
33 33 if (len > 3) {
34 34 DCCP_WARN("invalid length %d\n", len);
35   - return 1;
  35 + return -EINVAL;
36 36 }
37 37 /* XXX add further sanity checks */
38 38