lib: make capn_inflate() work with unaligned data

init_fp itself tries to read 4 bytes for the segment count.
This commit is contained in:
David Lamparter 2016-06-27 14:33:16 +02:00
parent 5d787b698e
commit 3059f4dd5c
2 changed files with 28 additions and 10 deletions

View file

@ -287,6 +287,9 @@ struct capn_stream {
uint8_t *next_out;
size_t avail_out;
unsigned zeros, raw;
uint8_t inflate_buf[8];
size_t avail_buf;
};
#define CAPN_MISALIGNED -1