diff options
author | wollman <wollman@FreeBSD.org> | 2009-11-25 04:49:41 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2009-11-25 04:49:41 +0000 |
commit | d0aa37ef30706d9707ef8ebd9e7f45542fb22540 (patch) | |
tree | 8ed33fccc29cc8164edc6086a046e3d3abc4eb54 /lib | |
parent | a98dd21d5f02e42d66bdd19531580000647322e8 (diff) | |
download | FreeBSD-src-d0aa37ef30706d9707ef8ebd9e7f45542fb22540.zip FreeBSD-src-d0aa37ef30706d9707ef8ebd9e7f45542fb22540.tar.gz |
In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTED
&& SUCCESS case succeeds. The stack garbage might be zero.
Found by: Clang static analyzer
MFC after: 7 days
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/rpc/svc_raw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libc/rpc/svc_raw.c b/lib/libc/rpc/svc_raw.c index 7492046..67bcba1 100644 --- a/lib/libc/rpc/svc_raw.c +++ b/lib/libc/rpc/svc_raw.c @@ -176,9 +176,8 @@ svc_raw_reply(xprt, msg) msg->acpted_rply.ar_results.proc = (xdrproc_t) xdr_void; msg->acpted_rply.ar_results.where = NULL; - if (!xdr_replymsg(xdrs, msg) || - !SVCAUTH_WRAP(&SVC_AUTH(xprt), xdrs, xdr_proc, xdr_where)) - stat = FALSE; + stat = xdr_replymsg(xdrs, msg) && + SVCAUTH_WRAP(&SVC_AUTH(xprt), xdrs, xdr_proc, xdr_where); } else { stat = xdr_replymsg(xdrs, msg); } |