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 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

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

Reply via email to