commit c8d0196f09c787edce11ee6b848ecb8ad8afb1b4 from: Omar Polo via: Thomas Adam date: Fri Sep 02 15:54:01 2022 UTC fix regression in gotweb_free_repo_tag(): free(...): modified chunk-pointer problem introduced in commit 625e5896fc9ecf87ccfc92ad2a65cd3be58f73c0 commit - 04051e8bf0f434a80f5d786b1c6e9dfc8c99ad45 commit + c8d0196f09c787edce11ee6b848ecb8ad8afb1b4 blob - 119ea8cce6faf8185d2bb72845171f54d0826016 blob + 5fce42390992cf954333baecc64969576e0c01ab --- gotwebd/gotweb.c +++ gotwebd/gotweb.c @@ -1693,9 +1693,10 @@ gotweb_render_tag(struct request *c) if (error) goto done; - if (strncmp(rt->tag_name, "refs/", 5) == 0) - rt->tag_name += 5; - error = gotweb_escape_html(&tagname, rt->tag_name); + tagname = rt->tag_name; + if (strncmp(tagname, "refs/", 5) == 0) + tagname += 5; + error = gotweb_escape_html(&tagname, tagname); if (error) goto done; @@ -1780,9 +1781,10 @@ gotweb_render_tags(struct request *c) if (error) goto done; - if (strncmp(rt->tag_name, "refs/tags/", 10) == 0) - rt->tag_name += 10; - error = gotweb_escape_html(&tagname, rt->tag_name); + tagname = rt->tag_name; + if (strncmp(tagname, "refs/tags/", 10) == 0) + tagname += 10; + error = gotweb_escape_html(&tagname, tagname); if (error) goto done;