summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2004-12-30 20:55:03 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2004-12-30 20:55:03 +0000
commit59862dfc1f001ab61a451e033c1d947673f24313 (patch)
tree6a3dba0e6de2cd62407b339eb0b7b21b4ed00041 /usr.bin/cvs
parentfe9c62002d60261fc32a75ed85f90ac453850f6f (diff)
add strdup() check; jfb ok
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/conf.y6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/cvs/conf.y b/usr.bin/cvs/conf.y
index 54bd91070a0..61b50e6f589 100644
--- a/usr.bin/cvs/conf.y
+++ b/usr.bin/cvs/conf.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.y,v 1.5 2004/11/28 15:12:17 pat Exp $ */
+/* $OpenBSD: conf.y,v 1.6 2004/12/30 20:55:02 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -465,6 +465,10 @@ lex_start:
}
conf_pbuf = strdup(mval);
+ if (conf_pbuf == NULL) {
+ cvs_log(LP_ERRNO, "failed to copy macro");
+ return (-1);
+ }
conf_pbind = 0;
goto lex_start;
}