We should skip the null element from 'dp'. This fixes the problem that found
by tests/functional/076

Signed-off-by: Liu Yuan <[email protected]>
---
 lib/fec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/fec.c b/lib/fec.c
index f978ae0..1d60e8b 100644
--- a/lib/fec.c
+++ b/lib/fec.c
@@ -604,7 +604,8 @@ static inline void decode_prepare(struct fec *ctx, const 
uint8_t *dp[],
                } else {
                        out[i] = dp[p];
                        outidx[i] = p;
-                       p++;
+                       while (!dp[++p])
+                               ;
                }
        }
 }
-- 
1.7.9.5

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to