From mboxrd@z Thu Jan 1 00:00:00 1970 From: sylvain at abstraction.fr (Sylvain Rabot) Date: Fri, 7 Oct 2016 13:54:33 +0200 Subject: Small patch makes cgit crash In-Reply-To: <20161007131719.7b80c9dd@leda.localdomain> References: <20161007113350.045550bc@leda.localdomain> <20161007115123.4cdb50d4@leda.localdomain> <20161007131719.7b80c9dd@leda.localdomain> Message-ID: 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 wrote: > Christian Hesse on Fri, 2016/10/07 11:51: >> Christian Hesse on Fri, 2016/10/07 11:33: >> > Sylvain Rabot 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