From 71cb6eaa4b8da16f2034ccb47365b983c9bf799c Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Sat, 14 Oct 2023 10:13:15 -0400 Subject: [PATCH] Add length checks to conv_k7 kernels Signed-off-by: Clayton Smith --- kernels/volk/volk_8u_conv_k7_r2puppet_8u.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h b/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h index e154c54a1..118b5972b 100644 --- a/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h +++ b/kernels/volk/volk_8u_conv_k7_r2puppet_8u.h @@ -101,7 +101,9 @@ static inline void volk_8u_conv_k7_r2puppet_8u_spiral(unsigned char* syms, unsigned char* dec, unsigned int framebits) { - + if (framebits < 12) { + return; + } static int once = 1; int d_numstates = (1 << 6); @@ -183,7 +185,9 @@ static inline void volk_8u_conv_k7_r2puppet_8u_neonspiral(unsigned char* syms, unsigned char* dec, unsigned int framebits) { - + if (framebits < 12) { + return; + } static int once = 1; int d_numstates = (1 << 6); @@ -266,7 +270,9 @@ static inline void volk_8u_conv_k7_r2puppet_8u_neonspiral(unsigned char* syms, // unsigned char* dec, // unsigned int framebits) //{ -// +// if (framebits < 12) { +// return; +// } // // static int once = 1; // int d_numstates = (1 << 6); @@ -347,7 +353,9 @@ static inline void volk_8u_conv_k7_r2puppet_8u_generic(unsigned char* syms, unsigned char* dec, unsigned int framebits) { - + if (framebits < 12) { + return; + } static int once = 1; int d_numstates = (1 << 6);