Instability when using management CLI
Dag-Erling Smørgrav
des at linpro.no
Wed Mar 28 09:35:55 CEST 2007
Kristoffer Gleditsch <kristoffer.gleditsch at met.no> writes:
> I'm not sure I understand every aspect of this function, but I'm unable
> to see where the space for that extra newline is allocated, and
> re-compiling version 1.0.3 with the attached patch seems to have
> stabilized it.
Good catch, but there are a couple of snags.
First of all, I think the final newline is meant to replace the
trailing space, i.e. ["a" "b" "c"\n] rather than ["a" "b" "c" \n].
However, the for loop escapes double quotes, newlines and backslashes,
so the string may grow well beyond the strlen() + 3 set aside for each
argument. I'll send you an updated patch later today.
DES
--
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
More information about the varnish-dev
mailing list