diff options
author | Richard Levitte <levitte@openssl.org> | 2004-05-06 09:33:29 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-05-06 09:33:29 +0000 |
commit | f527222c4df597722688cb378c284c6efcf2a402 (patch) | |
tree | d1eb106bfed4cc4d09e0a5416b1aa42a0a3697e7 | |
parent | 1c27ce4e7040e52ad9c8df6446cc345e16d5076e (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.c | 5 |
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 |