projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
942131f
)
Avoid division by zero in setup_next_fec_group().
author
Andre Noll
<maan@systemlinux.org>
Thu, 5 Mar 2009 21:03:14 +0000
(22:03 +0100)
committer
Andre Noll
<maan@systemlinux.org>
Thu, 5 Mar 2009 21:03:14 +0000
(22:03 +0100)
This needs more work.
vss.c
patch
|
blob
|
history
diff --git
a/vss.c
b/vss.c
index 4efe38f6560d3fafab67699d351aa1c0be7083d5..d0e1cf53242a52bbdcef4b486136747239784734 100644
(file)
--- a/
vss.c
+++ b/
vss.c
@@
-238,6
+238,9
@@
static int setup_next_fec_group(struct fec_client *fc, struct vss_task *vsst)
fc->group.num_chunks = i - fc->group.first_chunk;
fc->slice.num = 0;
fc->slice.bytes = ROUND_UP(fc->group.bytes, k) / k;
+ /* FIXME: Avoid division by zero in a better way */
+ if (!fc->slice.bytes)
+ return 0;
/* The last slice will not be fully used */
last_payload_size = fc->group.bytes % fc->slice.bytes;