projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3e1a2e1
)
fecdec: Add another sanity check to find_group().
author
Andre Noll
<maan@systemlinux.org>
Fri, 1 May 2009 20:07:49 +0000
(22:07 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Fri, 1 May 2009 20:07:49 +0000
(22:07 +0200)
fecdec_filter.c
patch
|
blob
|
history
diff --git
a/fecdec_filter.c
b/fecdec_filter.c
index ee3d0d6eac595378f6f4a6380d5c93441602b3aa..5f37f1a81f9199f6080b6669cd455d706a96af06 100644
(file)
--- a/
fecdec_filter.c
+++ b/
fecdec_filter.c
@@
-117,10
+117,15
@@
static int find_group(struct fec_header *h,
FOR_EACH_FECDEC_GROUP(fg, pfd) {
if (fg->h.group_num != h->group_num)
continue;
+ if (fg->num_received_slices == 0)
+ goto success;
if (fg->h.slices_per_group != h->slices_per_group)
return -E_BAD_FEC_HEADER;
if (fg->h.data_slices_per_group != h->data_slices_per_group)
return -E_BAD_FEC_HEADER;
+ if (fg->h.group_bytes != h->group_bytes)
+ return -E_BAD_FEC_HEADER;
+success:
*result = fg;
return 1;
}