Use strstr instead of strnstr

This commit is contained in:
Douglas Stebila 2020-03-26 09:44:17 -04:00
parent f437663bd0
commit efdbed4d67
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ int main(int argc, char **argv) {
OQS_STATUS rc;
#if OQS_USE_PTHREADS_IN_TESTS
// don't run Classic McEliece or LEDAcryptKEM-LT52 in threads because of large stack usage
if ((strnstr(alg_name, "Classic-McEliece", 16) == NULL) && (strnstr(alg_name, "LEDAcryptKEM-LT52", 17) == NULL)) {
if ((strstr(alg_name, "Classic-McEliece") == NULL) && (strstr(alg_name, "LEDAcryptKEM-LT52") == NULL)) {
pthread_t thread;
void *status;
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);

View File

@ -127,7 +127,7 @@ int main(int argc, char **argv) {
OQS_STATUS rc;
#if OQS_USE_PTHREADS_IN_TESTS
// don't run Rainbow IIIc and Vc in threads because of large stack usage
if ((strnstr(alg_name, "Rainbow-IIIc", 12) == NULL) && (strnstr(alg_name, "Rainbow-Vc", 10) == NULL)) {
if ((strstr(alg_name, "Rainbow-IIIc") == NULL) && (strstr(alg_name, "Rainbow-Vc") == NULL)) {
pthread_t thread;
void *status;
int trc = pthread_create(&thread, NULL, test_wrapper, alg_name);