On Sun, 6 Nov 2011, Stefan Fritsch wrote:
Isn't it sufficient to reduce space_left only by repl_len?
IMHO we only allocate repl_len new memory in ap_pregsub_ex and not len
+ repl_len or am I wrong here?




Any comment on that?

That was also supposed to cause the line length to be limited instead of the length of the replacement. But you are right, this is not correct. I will look at it during the hackathon.

I have looked more closely, and the code is actually correct. It's purpose is not to limit new memory allocation but the line length. I have added a few comments in r1199060 which hopefully make the intentions clear.

Reply via email to