projects
/
tahoe-lafs
/
zfec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f6adc5
)
fec.c: add asserts for the preconditions that the inputs need to meet
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 24 Jan 2016 05:11:44 +0000
(10:41 +0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Sun, 24 Jan 2016 05:11:44 +0000
(10:41 +0530)
zfec/fec.c
patch
|
blob
|
history
diff --git
a/zfec/fec.c
b/zfec/fec.c
index b03bae1f8c8ad5371e0610b8ce6cdfd93b2c8434..4df0d98de563fcf88fb44b2a288c4d9b9f3d0390 100644
(file)
--- a/
zfec/fec.c
+++ b/
zfec/fec.c
@@
-418,6
+418,11
@@
fec_new(unsigned short k, unsigned short n) {
fec_t *retval;
+ assert(k >= 1);
+ assert(n >= 1);
+ assert(n <= 256);
+ assert(k <= n);
+
if (fec_initialized == 0)
init_fec ();