diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2015-07-18 22:42:10 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2015-07-18 22:42:10 +0000 |
commit | b0fe97027b1a67eea176258f89db2aa15c115458 (patch) | |
tree | 18fdfdb28d5912afc9982bca23a9ae3afa2a927d /lib/libcrypto | |
parent | ed57351851bf7f34b0d76a054a5fe65b256894be (diff) |
Coverity 21651
ok doug@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/conf/conf_def.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c index 5526fa5c039..e11ef95e437 100644 --- a/lib/libcrypto/conf/conf_def.c +++ b/lib/libcrypto/conf/conf_def.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_def.c,v 1.30 2015/04/30 15:28:03 deraadt Exp $ */ +/* $OpenBSD: conf_def.c,v 1.31 2015/07/18 22:42:09 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -573,8 +573,12 @@ str_copy(CONF *conf, char *section, char **pto, char *from) CONF_R_VARIABLE_HAS_NO_VALUE); goto err; } - BUF_MEM_grow_clean(buf, - (strlen(p) + buf->length - (e - from))); + if (!BUF_MEM_grow_clean(buf, + (strlen(p) + buf->length - (e - from)))) { + CONFerr(CONF_F_STR_COPY, + CONF_R_MODULE_INITIALIZATION_ERROR); + goto err; + } while (*p) buf->data[to++] = *(p++); |