Commit Diff


commit - 3976db154b362a2b110c8dba0c44d1845f9a6e90
commit + 3bfc233445b0e31daeeebe0e0a98bf346af7be03
blob - 4a1a3b5a468f64d961a00092f1e31c7840fa0674
blob + d023ca662cadef23be987f2cb6408ceb599a0ebc
--- lib/pack.c
+++ lib/pack.c
@@ -1123,6 +1123,11 @@ got_pack_dump_delta_chain_to_file(size_t *result_size,
 			return got_error_from_errno("malloc");
 		base_file = NULL;
 		accum_file = NULL;
+	} else {
+		if (fseeko(base_file, 0L, SEEK_SET) == -1)
+			return got_error_from_errno("fseeko");
+		if (fseeko(accum_file, 0L, SEEK_SET) == -1)
+			return got_error_from_errno("fseeko");
 	}
 
 	/* Deltas are ordered in ascending order. */