diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 10 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/conf/conf_def.c | 10 |
2 files changed, 14 insertions, 6 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 | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf_def.c b/src/lib/libssl/src/crypto/conf/conf_def.c index 5526fa5c03..e11ef95e43 100644 --- a/src/lib/libssl/src/crypto/conf/conf_def.c +++ b/src/lib/libssl/src/crypto/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 | ||
