diff options
author | beck <> | 2015-07-18 22:42:09 +0000 |
---|---|---|
committer | beck <> | 2015-07-18 22:42:09 +0000 |
commit | 47ef019d2dada0f1d7528d873b6f626f8a946501 (patch) | |
tree | facb6cdefd9cb532c9975858d3098e27b7a63cda /src/lib/libcrypto/conf | |
parent | c8284a2ee2bd043995415ee17f3fbcbe3a56126b (diff) | |
download | openbsd-47ef019d2dada0f1d7528d873b6f626f8a946501.tar.gz openbsd-47ef019d2dada0f1d7528d873b6f626f8a946501.tar.bz2 openbsd-47ef019d2dada0f1d7528d873b6f626f8a946501.zip |
Coverity 21651
ok doug@
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index 5526fa5c03..e11ef95e43 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: conf_def.c,v 1.30 2015/04/30 15:28:03 deraadt Exp $ */ | 1 | /* $OpenBSD: conf_def.c,v 1.31 2015/07/18 22:42:09 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -573,8 +573,12 @@ str_copy(CONF *conf, char *section, char **pto, char *from) | |||
573 | CONF_R_VARIABLE_HAS_NO_VALUE); | 573 | CONF_R_VARIABLE_HAS_NO_VALUE); |
574 | goto err; | 574 | goto err; |
575 | } | 575 | } |
576 | BUF_MEM_grow_clean(buf, | 576 | if (!BUF_MEM_grow_clean(buf, |
577 | (strlen(p) + buf->length - (e - from))); | 577 | (strlen(p) + buf->length - (e - from)))) { |
578 | CONFerr(CONF_F_STR_COPY, | ||
579 | CONF_R_MODULE_INITIALIZATION_ERROR); | ||
580 | goto err; | ||
581 | } | ||
578 | while (*p) | 582 | while (*p) |
579 | buf->data[to++] = *(p++); | 583 | buf->data[to++] = *(p++); |
580 | 584 | ||