diff options
author | 2015-07-18 22:42:09 +0000 | |
---|---|---|
committer | 2015-07-18 22:42:09 +0000 | |
commit | f5619d72d32d94af195b20417f8b3fdb50e9000e (patch) | |
tree | c95c3d527d1a3dd94bf5e6321e6f7312344d3234 /lib/libssl/src | |
parent | Convert dtls1_get_record to CBS. (diff) | |
download | wireguard-openbsd-f5619d72d32d94af195b20417f8b3fdb50e9000e.tar.xz wireguard-openbsd-f5619d72d32d94af195b20417f8b3fdb50e9000e.zip |
Coverity 21651
ok doug@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/conf/conf_def.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libssl/src/crypto/conf/conf_def.c b/lib/libssl/src/crypto/conf/conf_def.c index 5526fa5c039..e11ef95e437 100644 --- a/lib/libssl/src/crypto/conf/conf_def.c +++ b/lib/libssl/src/crypto/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++); |