r1287 - trunk/varnish-cache/bin/varnishd

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Mar 29 23:48:31 CEST 2007

>   trunk/varnish-cache/bin/varnishd/mgt_cli.c
>The argv length calculation was not only off by one, but failed to take
>into account the extra space required by expanded quotes, backslashes and
>newlines.  Instead of pre-allocating a (possibly too short) buffer, start
>with a 64-byte buffer and double it every time we come close to filling
>it up.  Also, avoid appending a trailing space before the final newline.
>This issue was uncovered by Kristoffer Gleditsch <kristoffer at linpro.no>,
>who also helped test this patch.

use of vsb might be in order ?

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-commit mailing list