summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2004-05-06 09:33:29 +0000
committerRichard Levitte <levitte@openssl.org>2004-05-06 09:33:29 +0000
commitf527222c4df597722688cb378c284c6efcf2a402 (patch)
treed1eb106bfed4cc4d09e0a5416b1aa42a0a3697e7
parent1c27ce4e7040e52ad9c8df6446cc345e16d5076e (diff)
When the pointer 'from' changes, it's stored length needs to change as
well. Notified by Frank Kardel <kardel@acm.org> in PR 879.
-rw-r--r--crypto/conf/conf_def.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index adc28eebff..aba2c9fd84 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -599,6 +599,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from)
BUF_MEM_grow(buf,(strlen(p)+len-(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