Max Bowsher wrote:
> Kouhei Sutou wrote:
>> Does attached patch solve this problem?
>
> Yes, it does! Congratulations, Kouhei, on tracking this one down. :-)
> Please go ahead and commit it, and nominate it in STATUS for 1.4.x too.
>
>> Index: subversion/bindings/swig/svn_delta.i
>> ===================================================================
>> --- subversion/bindings/swig/svn_delta.i (revision 21073)
>> +++ subversion/bindings/swig/svn_delta.i (working copy)
>> @@ -169,7 +169,8 @@
>> char *tbuf;
>> apr_size_t tlen;
>>
>> - tbuf = ALLOCA_N(char, (window->tview_len + 1));
>> + tlen = window->tview_len + 1;
>> + tbuf = ALLOCA_N(char, tlen);
>> svn_txdelta_apply_instructions(window, sbuf, tbuf, &tlen);
>>
>> return rb_str_new(tbuf, tlen);
Should a comment be added, explaining that this is here to fix a bug? In 6
months time someone's liable to look at that code, wonder why there's a
temporary variable, and probably put things back in the name of making the
code cleaner.
A
# Note: ALLOCA_N(char, (window->tview_len + 1)); triggers a bug
comment would help avert this.
N
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 17 21:29:55 2006