On Wed, Dec 02, 2009 at 11:47:03PM +0100, Cyril Bonté wrote: > Le mercredi 2 décembre 2009 23:12:50, Willy Tarreau a écrit : > > I find it particularly amazing that you're the first > > to observe this, considering how old those parts are ! > > That also surprised me, then I've made some more tests : > this only happens when we use backslashes on the last line of the > configuration file, without returning to the line
Ah OK now it makes more sense. Otherwise the \n would have been translated into \0 and moved. I'll recheck the code taking that in mind, because I think we'll have to add some \0 after a copy. Personally I'd be in favor of rejecting a config with a missing LF at the end, indicating what was wrong so that the user can fix the conf. A truncated line should clearly not be used as a potentially valid one. > also if the last line is like : > rspadd Cache-Control:\ max-age=1500\ > the last backslash causes a segfault wow good catch. This one would be even harder to fix without the check above I think. Thanks for your reports Cyril, I have enough info to reproduce and emit fixes. Willy

