]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Sync with Git 2.30.7
authorJunio C Hamano <gitster@pobox.com>
Tue, 13 Dec 2022 12:02:20 +0000 (21:02 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Dec 2022 12:02:20 +0000 (21:02 +0900)
1  2 
attr.c
git-compat-util.h
pretty.c
t/t4205-log-pretty-formats.sh
t/test-lib.sh

diff --cc attr.c
index 59a8d8af1ae821223dd70fc61949406f1a384e4c,f9316d14baf835ee498722a4dc26bd9bd56a8efd..f826ba21deb74cd4a678055811cc8515eb544035
--- 1/attr.c
--- 2/attr.c
+++ b/attr.c
@@@ -729,11 -750,15 +750,15 @@@ static struct attr_stack *read_attr_fro
        if (!istate)
                return NULL;
  
-       buf = read_blob_data_from_index(istate, path, NULL);
+       buf = read_blob_data_from_index(istate, path, &size);
        if (!buf)
                return NULL;
+       if (size >= ATTR_MAX_FILE_SIZE) {
+               warning(_("ignoring overly large gitattributes blob '%s'"), path);
+               return NULL;
+       }
  
 -      res = xcalloc(1, sizeof(*res));
 +      CALLOC_ARRAY(res, 1);
        for (sp = buf; *sp; ) {
                char *ep;
                int more;
Simple merge
diff --cc pretty.c
Simple merge
Simple merge
diff --cc t/test-lib.sh
Simple merge