summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2003-11-21 21:42:35 +0000
committerGeoff Thorpe <geoff@openssl.org>2003-11-21 21:42:35 +0000
commitec2179cf81687380eaef3c745e2dbbc15bbbe2cb (patch)
treedee262674bc8289342b9dac90a4d66ee98effac6 /crypto/conf
parenta8287a90ead0b3d266f2555885790edc7cbd7cbd (diff)
Fix a small bug in str_copy: if more than one variable is replaced, make
sure the current length is used to calculate the new buffer length instead of using the old length (prior to any variable substitution). Submitted by: Nils Larsch
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_def.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 57d2739ae0..52a87aa76c 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -629,7 +629,7 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE);
goto err;
}
- BUF_MEM_grow_clean(buf,(strlen(p)+len-(e-from)));
+ BUF_MEM_grow_clean(buf,(strlen(p)+buf->length-(e-from)));
while (*p)
buf->data[to++]= *(p++);
from=e;