1 --- cvs-fast-export-1.66/export.c.orig 2024-04-07 15:56:24.234143317 +0200
2 +++ cvs-fast-export-1.66/export.c 2024-04-07 15:59:49.626363945 +0200
3 @@ -182,7 +182,7 @@ static void export_blob(node_t *node, vo
7 - if (strlen(cbuf) >= 2 && cbuf[0] == '!' && cbuf[1] == '\n') {
8 + if (strnlen(cbuf, len) >= 2 && cbuf[0] == '!' && cbuf[1] == '\n') {
12 @@ -724,7 +724,7 @@ static struct commit_seq *canonicalize(g
13 (((struct commit_seq *)x)->commit->date < \
14 ((struct commit_seq *)y)->commit->date)
15 /* back up as far as we can */
16 - while (!is_parent_of(bp - 1, hp) &&
17 + while ((bp > history) && !is_parent_of(bp - 1, hp) &&
18 !is_branchroot_of(bp - 1, hp) &&
19 !is_older_than(bp - 1, hp)) {