diff options
| author | Nathan Moinvaziri <nathan@solidstatenetworks.com> | 2019-10-20 14:40:42 -0700 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2019-10-22 09:58:46 +0200 |
| commit | 30131c54a9f62cdf8a93162b63216ca2cc516b8c (patch) | |
| tree | a7b7a6b7ffa5112521013b5dc4350d98dd3f1a49 | |
| parent | 33ce336b82f257689e7d20cee228fa61e079b90a (diff) | |
| download | Project-Tick-30131c54a9f62cdf8a93162b63216ca2cc516b8c.tar.gz Project-Tick-30131c54a9f62cdf8a93162b63216ca2cc516b8c.zip | |
Fixed load of misaligned address in deflate_quick.c. zlib-ng/zlib-ng#453
| -rw-r--r-- | arch/x86/deflate_quick.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/deflate_quick.c b/arch/x86/deflate_quick.c index b60fc04f21..3fa4f187e3 100644 --- a/arch/x86/deflate_quick.c +++ b/arch/x86/deflate_quick.c @@ -62,7 +62,7 @@ static inline long compare258(const unsigned char *const src0, const unsigned ch cnt += 16; } while (cnt < 256); - if (*(unsigned short *)(src0 + cnt) == *(unsigned short *)(src1 + cnt)) { + if (memcmp(src0 + cnt, src1 + cnt, sizeof(uint16_t)) == 0) { cnt += 2; } else if (*(src0 + cnt) == *(src1 + cnt)) { cnt++; |
