1 --- cvs-fast-export-1.62/export.c.orig 2023-12-10 22:08:38.039921414 +0100
2 +++ cvs-fast-export-1.62/export.c 2023-12-11 06:17:08.424656665 +0100
3 @@ -208,7 +208,7 @@ static void export_blob(node_t *node,
4 for (char *cp = cbuf; cp < cbuf + len; cp++)
7 - if (strlen(cbuf) >= 2 && cbuf[0] == '!' && cbuf[1] == '\n')
8 + if (strnlen(cbuf, len) >= 2 && cbuf[0] == '!' && cbuf[1] == '\n')
12 @@ -697,7 +697,7 @@ static struct commit_seq *canonicalize(g
13 #define is_branchroot_of(x, y) ((x)->head == (y)->head && (x)->isbase)
14 #define is_older_than(x, y) (((struct commit_seq *)x)->commit->date < ((struct commit_seq *)y)->commit->date)
15 /* back up as far as we can */
16 - while (!is_parent_of(bp-1, hp) && !is_branchroot_of(bp-1, hp) && !is_older_than(bp-1, hp))
17 + while ((bp > history) && !is_parent_of(bp-1, hp) && !is_branchroot_of(bp-1, hp) && !is_older_than(bp-1, hp))
20 /* shift commits up and put *hp where *bp was */