From: Andre Noll Date: Sun, 1 Mar 2009 20:09:37 +0000 (+0100) Subject: fecdec.c: Add some more sanity checks to find_group(). X-Git-Tag: v0.3.4~57^2~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=c708253b998a6253ddc5f18b9403fe27aad5e99b;ds=sidebyside fecdec.c: Add some more sanity checks to find_group(). --- diff --git a/fecdec_filter.c b/fecdec_filter.c index 8b326de5..6aa9071e 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -28,7 +28,7 @@ #define NUM_FEC_GROUPS 3 /** Size of the output buffer of the fecdec filter. */ -#define FECDEC_OUTBUF_SIZE 81920 +#define FECDEC_OUTBUF_SIZE (128 * 1024) /** Data read from the header of a slice. */ struct fec_header { @@ -112,7 +112,10 @@ static int find_group(struct fec_header *h, FOR_EACH_FECDEC_GROUP(fg, pfd) { if (fg->h.group_num != h->group_num) continue; - /* FIXME: Add some more sanity checks here */ + if (fg->h.slices_per_group != h->slices_per_group) + continue; + if (fg->h.data_slices_per_group != h->data_slices_per_group) + continue; *result = fg; return 1; }