Fixed primitives sign test buffer size.
static BOOL test_sign16s_func(void)
{
pstatus_t status;
- INT16 ALIGN(src[TEST_BUFFER_SIZE]);
- INT16 ALIGN(d1[TEST_BUFFER_SIZE]);
- INT16 ALIGN(d2[TEST_BUFFER_SIZE]);
-
+ INT16 ALIGN(src[TEST_BUFFER_SIZE + 16]);
+ INT16 ALIGN(d1[TEST_BUFFER_SIZE + 16]);
+ INT16 ALIGN(d2[TEST_BUFFER_SIZE + 16]);
winpr_RAND((BYTE*)src, sizeof(src));
-
+ memset(d1, 0, sizeof(d1));
+ memset(d2, 0, sizeof(d2));
status = generic->sign_16s(src + 1, d1 + 1, TEST_BUFFER_SIZE);
+
if (status != PRIMITIVES_SUCCESS)
return FALSE;
+
status = optimized->sign_16s(src + 1, d2 + 1, TEST_BUFFER_SIZE);
+
if (status != PRIMITIVES_SUCCESS)
return FALSE;
@@ -42,9 +45,12 @@ static BOOL test_sign16s_func(void)
return FALSE;
status = generic->sign_16s(src + 1, d1 + 2, TEST_BUFFER_SIZE);
+
if (status != PRIMITIVES_SUCCESS)
return FALSE;
+
status = optimized->sign_16s(src + 1, d2 + 2, TEST_BUFFER_SIZE);
+
if (status != PRIMITIVES_SUCCESS)
return FALSE;
