#define FECDEC_FILTER_ERRORS \
PARA_ERROR(BAD_FEC_HEADER, "invalid fec header"), \
- PARA_ERROR(BAD_SLICE_SIZE, "slice size too large"), \
+ PARA_ERROR(BAD_SLICE_SIZE, "slice size zero or too large"), \
PARA_ERROR(BAD_SLICE_NUM, "invalid slice number"), \
PARA_ERROR(FECDEC_OVERRUN, "fecdec output buffer overrun"), \
PARA_ERROR(FECDEC_EOF, "received eof packet"), \
ret = read_fec_header(buf, len, &h);
if (ret <= 0)
return ret;
- if (h.slice_bytes > fn->bufsize)
+ if (!h.slice_bytes || h.slice_bytes > fn->bufsize)
return -E_BAD_SLICE_SIZE;
if (h.slice_num > h.slices_per_group)
return -E_BAD_SLICE_NUM;