diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2004-12-30 20:55:03 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2004-12-30 20:55:03 +0000 |
commit | 59862dfc1f001ab61a451e033c1d947673f24313 (patch) | |
tree | 6a3dba0e6de2cd62407b339eb0b7b21b4ed00041 /usr.bin/cvs | |
parent | fe9c62002d60261fc32a75ed85f90ac453850f6f (diff) |
add strdup() check; jfb ok
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/conf.y | 6 |
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; } |