Commit f527222c authored by Richard Levitte's avatar Richard Levitte
Browse files

When the pointer 'from' changes, it's stored length needs to change as

well.

Notified by Frank Kardel <kardel@acm.org> in PR 879.
parent 1c27ce4e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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