Commit Diff


commit - 9c57c4c6816e643da8209cd6d1b7479cd1672114
commit + 9f6f4b2b2a23de4b38b50c2e7e3c00ffb8e8f56e
blob - 81b7bad406a36077c723a1b900eb1b2b66db898e
blob + efec5237009bdecf625d541301078dad8e089c1d
--- lib/pack.c
+++ lib/pack.c
@@ -1463,12 +1463,13 @@ got_pack_dump_delta_chain_to_file(size_t *result_size,
 				accum_bufsz = max_size;
 				if (pack->map) {
 					if (delta_data_offset > SIZE_MAX) {
-						return got_error_fmt(
+						err = got_error_fmt(
 						    GOT_ERR_RANGE,
 						    "delta offset %lld "
 						    "overflows size_t",
 						    (long long)
 						    delta_data_offset);
+						goto done;
 					}
 
 					mapoff = delta_data_offset;