Commit Diff


commit - 535e07c7d678cfc4a2b6ad61f72c36e0a46e5111
commit + 5de743f8fddcaaf2912ffc92dce239aa6227d6d0
blob - 85c7390aa9b5addf2127aa4e831f5c9f9c77b61d
blob + 0ffffe0f4e30bc85094fda4bfba4fc745011ab8a
--- lib/deltify.c
+++ lib/deltify.c
@@ -325,7 +325,8 @@ stretchblk(FILE *basefile, off_t base_offset0, struct 
 	size_t base_r, r, i;
 	int buf_equal = 1;
 
-	if (fseeko(basefile, base_offset0 + block->offset, SEEK_SET) == -1)
+	if (fseeko(basefile, base_offset0 + block->offset + *blocklen,
+	    SEEK_SET) == -1)
 		return got_error_from_errno("fseeko");
 
 	while (buf_equal && *blocklen < (1 << 24) - 1) {