diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-05-25 03:58:13 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2005-05-25 03:58:13 +0000 |
commit | 80292b283799421a83fd3cd3aeb72e69b09e233a (patch) | |
tree | c198ad8a8eda48e8c8ce0704bef34a1d6f930a90 /usr.bin/cvs | |
parent | bfa913705c70f086ba98e30fbf33f8aff2f231c3 (diff) |
check the return value of cvs_startcmd() in cvs_req_command() so we
send the OK response if it went through, instead of grabbing a random
value from the stack
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/req.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/req.c b/usr.bin/cvs/req.c index d5074774665..9bd49fd64bc 100644 --- a/usr.bin/cvs/req.c +++ b/usr.bin/cvs/req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: req.c,v 1.15 2005/05/24 04:12:25 jfb Exp $ */ +/* $OpenBSD: req.c,v 1.16 2005/05/25 03:58:12 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -546,7 +546,7 @@ cvs_req_gzipstream(int reqid, char *line) static int cvs_req_command(int reqid, char *line) { - int ret; + int ret = 0; struct cvs_cmd *cmdp; cmdp = cvs_findcmdbyreq(reqid); @@ -555,8 +555,7 @@ cvs_req_command(int reqid, char *line) return (-1); } - cvs_startcmd(cmdp, cvs_req_nargs, cvs_req_args); - + ret = cvs_startcmd(cmdp, cvs_req_nargs, cvs_req_args); if (ret == 0) ret = cvs_sendresp(CVS_RESP_OK, NULL); |