mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-17 06:55:02 -05:00
Fixed use of uninitialized deflater
This commit is contained in:
parent
a9d9126229
commit
7bea01d0ce
@ -50,12 +50,12 @@ void test_spdylay_zlib_with(uint16_t version)
|
|||||||
ssize_t deflatebuf_len;
|
ssize_t deflatebuf_len;
|
||||||
spdylay_buffer_init(&buf, 4096);
|
spdylay_buffer_init(&buf, 4096);
|
||||||
|
|
||||||
deflatebuf_max = spdylay_zlib_deflate_hd_bound(&deflater, sizeof(msg));
|
|
||||||
deflatebuf = malloc(deflatebuf_max);
|
|
||||||
|
|
||||||
CU_ASSERT(0 == spdylay_zlib_deflate_hd_init(&deflater, version));
|
CU_ASSERT(0 == spdylay_zlib_deflate_hd_init(&deflater, version));
|
||||||
CU_ASSERT(0 == spdylay_zlib_inflate_hd_init(&inflater, version));
|
CU_ASSERT(0 == spdylay_zlib_inflate_hd_init(&inflater, version));
|
||||||
|
|
||||||
|
deflatebuf_max = spdylay_zlib_deflate_hd_bound(&deflater, sizeof(msg));
|
||||||
|
deflatebuf = malloc(deflatebuf_max);
|
||||||
|
|
||||||
CU_ASSERT(0 < (deflatebuf_len = spdylay_zlib_deflate_hd
|
CU_ASSERT(0 < (deflatebuf_len = spdylay_zlib_deflate_hd
|
||||||
(&deflater, deflatebuf, deflatebuf_max,
|
(&deflater, deflatebuf, deflatebuf_max,
|
||||||
(const uint8_t*)msg, sizeof(msg))));
|
(const uint8_t*)msg, sizeof(msg))));
|
||||||
|
Loading…
Reference in New Issue
Block a user