|
|
|
@ -125,7 +125,7 @@ static const unsigned short mszip_bit_mask_tab[17] = { |
|
|
|
|
|
|
|
|
|
static int mszip_read_input(struct mszip_stream *zip) { |
|
|
|
|
int nread = zip->read_cb ? zip->read_cb(zip->file, zip->inbuf, (int)zip->inbuf_size) : cli_readn(zip->fd, zip->inbuf, (int)zip->inbuf_size); |
|
|
|
|
if (nread < 0) return zip->error = CL_EIO; |
|
|
|
|
if (nread < 0) return zip->error = CL_EFORMAT; |
|
|
|
|
|
|
|
|
|
zip->i_ptr = &zip->inbuf[0]; |
|
|
|
|
zip->i_end = &zip->inbuf[nread]; |
|
|
|
@ -749,7 +749,7 @@ void mszip_free(struct mszip_stream *zip) { |
|
|
|
|
|
|
|
|
|
static int lzx_read_input(struct lzx_stream *lzx) { |
|
|
|
|
int bread = lzx->read_cb ? lzx->read_cb(lzx->file, &lzx->inbuf[0], (int)lzx->inbuf_size) : cli_readn(lzx->fd, &lzx->inbuf[0], (int)lzx->inbuf_size); |
|
|
|
|
if (bread < 0) return lzx->error = CL_EIO; |
|
|
|
|
if (bread < 0) return lzx->error = CL_EFORMAT; |
|
|
|
|
|
|
|
|
|
/* huff decode's ENSURE_BYTES(16) might overrun the input stream, even
|
|
|
|
|
* if those bits aren't used, so fake 2 more bytes */ |
|
|
|
@ -1577,7 +1577,7 @@ void lzx_free(struct lzx_stream *lzx) { |
|
|
|
|
|
|
|
|
|
static int qtm_read_input(struct qtm_stream *qtm) { |
|
|
|
|
int nread = qtm->read_cb ? qtm->read_cb(qtm->file, &qtm->inbuf[0], (int)qtm->inbuf_size) : cli_readn(qtm->fd, &qtm->inbuf[0], (int)qtm->inbuf_size); |
|
|
|
|
if (nread < 0) return qtm->error = CL_EIO; |
|
|
|
|
if (nread < 0) return qtm->error = CL_EFORMAT; |
|
|
|
|
|
|
|
|
|
qtm->i_ptr = &qtm->inbuf[0]; |
|
|
|
|
qtm->i_end = &qtm->inbuf[nread]; |
|
|
|
|