diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2016-05-10 11:53:06 +0200 |
---|---|---|
committer | The Android Automerger <android-build@google.com> | 2016-06-17 05:12:32 -0700 |
commit | 46ed495a2788644f36920fe776864d79cbc1b995 (patch) | |
tree | fe402f70a971a53e4c5d32bc575e39259698c179 | |
parent | c8966476a1b9443b8b433fb14a1f64832fe726a7 (diff) | |
download | extras-46ed495a2788644f36920fe776864d79cbc1b995.tar.gz |
libfec: pack the fec_header structure
The fec_header structure is generated build time and stored on disk.
The fec_header might be build on a 64 bits machine while it is read
per a 32 bits device or the other way around. In such situations, the
fec_header fields are not aligned as expected by the device and it
fails to read the fec_header structure.
This patch makes the fec_header packed.
Change-Id: I77546f850cea5559909971a1192e1a7616d22d50
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
-rw-r--r-- | libfec/include/fec/io.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfec/include/fec/io.h b/libfec/include/fec/io.h index 3b5dac06..670a5d7e 100644 --- a/libfec/include/fec/io.h +++ b/libfec/include/fec/io.h @@ -49,7 +49,7 @@ struct fec_header { uint32_t fec_size; uint64_t inp_size; uint8_t hash[SHA256_DIGEST_LENGTH]; -}; +} __attribute__ ((packed)); struct fec_status { int flags; |