| Index: include/opentype-sanitiser.h
|
| ===================================================================
|
| --- include/opentype-sanitiser.h (revision 79)
|
| +++ include/opentype-sanitiser.h (working copy)
|
| @@ -57,8 +57,9 @@
|
| }
|
|
|
| if (chksum_buffer_offset_ == 4) {
|
| - // TODO(yusukes): This cast breaks the strict-aliasing rule.
|
| - chksum_ += ntohl(*reinterpret_cast<const uint32_t*>(chksum_buffer_));
|
| + uint32_t chksum;
|
| + std::memcpy(&chksum, chksum_buffer_, 4);
|
| + chksum_ += ntohl(chksum);
|
| chksum_buffer_offset_ = 0;
|
| }
|
|
|
|
|