From ccd68ce9e2eeb12507b658aaed01f9432c56a40d Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Sun, 24 Jan 2016 10:41:44 +0530 Subject: [PATCH 1/1] fec.c: add asserts for the preconditions that the inputs need to meet --- zfec/fec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zfec/fec.c b/zfec/fec.c index b03bae1..4df0d98 100644 --- 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 (); -- 2.45.2