From 430d7afd80a44acdca11831084de0480d9dd270b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 6 May 2004 09:33:22 +0000 Subject: When the pointer 'from' changes, it's stored length needs to change as well. Notified by Frank Kardel in PR 879. --- crypto/conf/conf_def.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crypto/conf/conf_def.c') diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 0451be0153..ba2a8830b4 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -632,6 +632,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) BUF_MEM_grow_clean(buf,(strlen(p)+buf->length-(e-from))); while (*p) buf->data[to++]= *(p++); + + /* Since we change the pointer 'from', we also have + to change the perceived length of the string it + points at. /RL */ + len -= e-from; from=e; } else -- cgit v1.2.3