r37063@cat (orig r1287): des | 2007-03-29 12:49:58 +0200
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@linpro.no>, who also helped test this patch. git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1330 d4fa192b-c00b-0410-8231-f00ffab90ce4
Showing
Please register or sign in to comment