summaryrefslogtreecommitdiff
path: root/usr.bin/cvs/server.c
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-25 21:58:01 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-25 21:58:01 +0000
commitc7c623ffd6a42edd4b7b8dbfa8e48ced0bf12e35 (patch)
tree9b0c5ac9aee0063f6b127fefa37386cf6940cdee /usr.bin/cvs/server.c
parentbb249d4f11269fa18c7a9bb75390befef5d66e60 (diff)
Check vasprintf for failure.
OK niallo@.
Diffstat (limited to 'usr.bin/cvs/server.c')
-rw-r--r--usr.bin/cvs/server.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/cvs/server.c b/usr.bin/cvs/server.c
index 01b3a97dcfd..91c6f5d32c7 100644
--- a/usr.bin/cvs/server.c
+++ b/usr.bin/cvs/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.55 2007/02/22 06:42:09 otto Exp $ */
+/* $OpenBSD: server.c,v 1.56 2007/05/25 21:58:00 ray Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -131,7 +131,8 @@ cvs_server_send_response(char *fmt, ...)
struct cvs_resp *resp;
va_start(ap, fmt);
- vasprintf(&data, fmt, ap);
+ if (vasprintf(&data, fmt, ap) == -1)
+ fatal("vasprintf: %s", strerror(errno));
va_end(ap);
if ((s = strchr(data, ' ')) != NULL)