update_engine: remove size_t in FEC write path
offset is calculated as a product of rs_n and some other size_t
variables. These variables are 32 bits on 32 bit platforms. We should
avoid usage of size_t when calculating storage bound values.
Bug: 361048795
Test: th
Change-Id: I1b496de459ab25aebfed2c625bb07d2636a1b190
diff --git a/payload_consumer/verity_writer_android.h b/payload_consumer/verity_writer_android.h
index 1aaafd5..9926988 100644
--- a/payload_consumer/verity_writer_android.h
+++ b/payload_consumer/verity_writer_android.h
@@ -63,8 +63,8 @@
brillo::Blob fec_;
brillo::Blob fec_read_;
EncodeFECStep current_step_;
- size_t current_round_;
- size_t num_rounds_;
+ uint64_t current_round_;
+ uint64_t num_rounds_;
FileDescriptor* read_fd_;
FileDescriptor* write_fd_;
uint64_t data_offset_;
@@ -73,7 +73,7 @@
uint64_t fec_size_;
uint64_t fec_roots_;
uint64_t block_size_;
- size_t rs_n_;
+ uint64_t rs_n_;
bool verify_mode_;
std::unique_ptr<void, decltype(&free_rs_char)> rs_char_;
UnownedCachedFileDescriptor cache_fd_;