summaryrefslogtreecommitdiff
path: root/verity
diff options
context:
space:
mode:
Diffstat (limited to 'verity')
-rw-r--r--verity/fec/image.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/verity/fec/image.cpp b/verity/fec/image.cpp
index 4b5502e4..43baeecd 100644
--- a/verity/fec/image.cpp
+++ b/verity/fec/image.cpp
@@ -80,7 +80,6 @@ static void calculate_rounds(uint64_t size, image *ctx)
static int process_chunk(void *priv, const void *data, size_t len)
{
image *ctx = (image *)priv;
- assert(len % FEC_BLOCKSIZE == 0);
if (data) {
memcpy(&ctx->input[ctx->pos], data, len);
@@ -136,6 +135,8 @@ static void file_image_load(const std::vector<int>& fds, image *ctx)
sparse_file_destroy(file);
}
+ assert(ctx->pos % FEC_BLOCKSIZE == 0);
+
for (auto fd : fds) {
close(fd);
}