register uint8_t *src = c->in;
register uint8_t *dst = c->out;
if (cnt > c->in_end - src) {
- cnt = c->in_end - src;
+ cnt = FFMAX(c->in_end - src, 0);
c->error |= LZO_INPUT_DEPLETED;
}
if (cnt > c->out_end - dst) {
- cnt = c->out_end - dst;
+ cnt = FFMAX(c->out_end - dst, 0);
c->error |= LZO_OUTPUT_FULL;
}
#if defined(INBUF_PADDED) && defined(OUTBUF_PADDED)
return;
}
if (cnt > c->out_end - dst) {
- cnt = c->out_end - dst;
+ cnt = FFMAX(c->out_end - dst, 0);
c->error |= LZO_OUTPUT_FULL;
}
if (back == 1) {