Commit Diff


commit - 06bd8ee415aa89adaeb49825ad96dfe83554b77e
commit + e9a3af3077c8973cb14a176aed8b0fc9658441ef
blob - f347f506f5945b7404cc0c48620474bfe6f179a5
blob + c5c1be69a232bf7e5a17ad4a0e06d81efbc1d8f8
--- lib/pack.c
+++ lib/pack.c
@@ -1466,12 +1466,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;