diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2016-09-01 15:51:12 -0700 |
---|---|---|
committer | Zheng Zhang <zhzh@google.com> | 2016-11-20 06:21:46 +0000 |
commit | 549f048fcb1b5fa5620ef4bd34a18b02c93a923d (patch) | |
tree | aca5bb550018982aa49a74d9eade7c7ba0a67d2e | |
parent | 61fce29c45cd5c2b94b836d68b49d231b0c6d2bb (diff) | |
download | extras-549f048fcb1b5fa5620ef4bd34a18b02c93a923d.tar.gz |
DO NOT MERGE: libfec: allow fec_header to be located anywhere
Don't require fec_header to be immediately after ECC data.
Bug: 28865197
Bug: 32789520
Change-Id: Ie8faeeb07c35e2593553f7678762aae7f14c2ff7
(cherrypicked from commit d9fd5b0d7507877ad6a0ede10c473fe2970d278d)
-rw-r--r-- | libfec/fec_open.cpp | 7 |
1 files changed, 0 insertions, 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); |