Small patch makes cgit crash

Sylvain Rabot sylvain at abstraction.fr
Fri Oct 7 13:54:33 CEST 2016


Indeed! I commented out line 509 and it now works.

Do you see any downside not freeing the commit buffer ?

On Fri, Oct 7, 2016 at 1:17 PM, Christian Hesse <list at eworm.de> wrote:
> Christian Hesse <list at eworm.de> on Fri, 2016/10/07 11:51:
>> Christian Hesse <list at eworm.de> on Fri, 2016/10/07 11:33:
>> > Sylvain Rabot <sylvain at abstraction.fr> on Fri, 2016/10/07 11:27:
>> > > I've made a small patch to make cgit's summary layout look more like
>> > > gitweb's. It works but in some cases which I wasn't able to determine
>> > > the particulars it seems to crash and the clone url and the footer are
>> > > not displayed, e.g. :
>> >
>> > Does it crash with the patch applied only?
>>
>> Ok, I can reproduce. For any reason info->subject is NULL when passed to
>> cgit_commit_link() in print_branch() (ui-refs.c, line 70).
>
> The issue is calling free_commit_buffer() in cgit_print_log() (ui-log.c, line
> 509). That frees data we need later...
> --
> main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
> "CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
> putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}



-- 
Sylvain Rabot <sylvain at abstraction.fr>


More information about the CGit mailing list