Crash when using path limit in ui-patch.c

Lukas Fleischer lfleischer at lfos.de
Thu Nov 24 20:14:32 CET 2016


On Thu, 24 Nov 2016 at 19:49:06, John Keeping wrote:
> [...]
> diff --git a/ui-patch.c b/ui-patch.c
> index ec7f3523..d29f74c7 100644
> --- a/ui-patch.c
> +++ b/ui-patch.c
> @@ -85,8 +85,7 @@ void cgit_print_patch(const char *new_rev, const char *old_rev,
>                         DIFF_FORMAT_PATCH | DIFF_FORMAT_SUMMARY;
>         if (prefix)
>                 rev.diffopt.stat_sep = fmt("(limited to '%s')\n\n", prefix);
> -       setup_revisions(ARRAY_SIZE(rev_argv), rev_argv, &rev,
> -                       NULL);
> +       setup_revisions(rev_argc, rev_argv, &rev, NULL);

I noticed that, too, when trying to find the culprit but the actual
issue is that the array is not NULL-terminated. Will submit a patch
soon.

>         prepare_revision_walk(&rev);
>  
>         while ((commit = get_revision(&rev)) != NULL) {
> _______________________________________________
> CGit mailing list
> CGit at lists.zx2c4.com
> http://lists.zx2c4.com/mailman/listinfo/cgit


More information about the CGit mailing list