commit 873d09e09fdcaceba69c02e8cefdb95cabfc80d9 from: Stefan Sperling via: Thomas Adam date: Sat Jul 26 10:36:08 2025 UTC show expected and actual sizes when delta application fails ok op@ commit - ef7196ff92a36328e82fb8b83228d475ed0155b0 commit + 873d09e09fdcaceba69c02e8cefdb95cabfc80d9 blob - 111ec814bd31c09485d156e50ed2d87e60a2017b blob + 85fa0ebab042bd2f409b16d11687cda0f2da7a5a --- lib/delta.c +++ lib/delta.c @@ -319,8 +319,10 @@ got_delta_apply_in_mem(uint8_t *base_buf, size_t base_ } if (err == NULL && *outsize != result_size) - err = got_error_msg(GOT_ERR_BAD_DELTA, - "delta application result size mismatch"); + err = got_error_fmt(GOT_ERR_BAD_DELTA, + "delta application result size mismatch: actual: %zd " + "expected: %llu", *outsize, result_size); + return err; } @@ -386,8 +388,9 @@ got_delta_apply(FILE *base_file, const uint8_t *delta_ } if (err == NULL && *outsize != result_size) - err = got_error_msg(GOT_ERR_BAD_DELTA, - "delta application result size mismatch"); + err = got_error_fmt(GOT_ERR_BAD_DELTA, + "delta application result size mismatch: actual: %zd " + "expected: %llu", *outsize, result_size); if (memstream != NULL) { if (fclose(memstream) == EOF && err == NULL)