From d9fd5b0d7507877ad6a0ede10c473fe2970d278d Mon Sep 17 00:00:00 2001 From: Sami Tolvanen Date: Thu, 1 Sep 2016 15:51:12 -0700 Subject: [PATCH] libfec: allow fec_header to be located anywhere Don't require fec_header to be immediately after ECC data. Bug: 28865197 Change-Id: Ie8faeeb07c35e2593553f7678762aae7f14c2ff7 --- libfec/fec_open.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp index 0e41bf4f..caec3704 100644 --- a/libfec/fec_open.cpp +++ b/libfec/fec_open.cpp @@ -145,13 +145,6 @@ static int parse_ecc_header(fec_handle *f, uint64_t offset) error("inconsistent ecc size %u", header.fec_size); return -1; } - /* structure: data | ecc | header */ - if (offset < header.fec_size || - offset - header.fec_size != header.inp_size) { - error("unexpected input size: %" PRIu64 " vs %" PRIu64, offset, - header.inp_size); - return -1; - } f->data_size = header.inp_size; f->ecc.blocks = fec_div_round_up(f->data_size, FEC_BLOCKSIZE); -- 2.11.0