commit | e6c8225bf30bb68c24fddba46538f42d78253c41 | [log] [tgz] |
---|---|---|
author | Jinguang Dong <dongjinguang@huawei.com> | Sat Feb 23 12:14:36 2019 +0800 |
committer | Bowgo Tsai <bowgotsai@google.com> | Sat Feb 23 07:07:13 2019 +0000 |
tree | a226f3ebfc0985d3a71113cab6bfff0bd273e6b7 | |
parent | 5e64dcd02e4c03f6bcd3d3cc65f4fc105191a31f [diff] |
Fix build error of generating fec data When we make the fec data for spare images, we will check each chunk the length of spare image but not the total length. If the libspare sends the data which is not a multiple of 4096, there is an error. We have reproduced it using our image. The data is send by https://android.googlesource.com/platform/system/core/+/fca4a9c27950a4a4281de0f413280cff9f4da653/libsparse/output_file.cpp#272 , and is checked by https://android.googlesource.com/platform/system/extras/+/29bf737e56e10c2742f1e14fe9f07184d59bbcc0/verity/fec/image.cpp#179 If the to_write in first link is equal INT_MAX, the assert in second link will be failed. Test: use fec to product fec data successfully ./fec --encode --roots 2 system.img fecdata Change-Id: Ib1e310a32bcda8acb3785d3784537d84fd439732