diff --git a/test/default/sodium_utils2.c b/test/default/sodium_utils2.c index e0d4895f..dc3a7a0b 100644 --- a/test/default/sodium_utils2.c +++ b/test/default/sodium_utils2.c @@ -67,10 +67,11 @@ int main(void) buf = sodium_malloc(size); sodium_mprotect_readonly(buf); sodium_mprotect_readwrite(buf); +#ifndef __EMSCRIPTEN__ sodium_memzero(((unsigned char *)buf) + size, 1U); sodium_mprotect_noaccess(buf); sodium_free(buf); printf("Overflow not caught\n"); - +#endif return 0; } diff --git a/test/default/sodium_utils3.c b/test/default/sodium_utils3.c index 67fdb31e..5a8344f2 100644 --- a/test/default/sodium_utils3.c +++ b/test/default/sodium_utils3.c @@ -45,10 +45,11 @@ int main(void) buf = sodium_malloc(size); sodium_mprotect_noaccess(buf); sodium_mprotect_readwrite(buf); +#ifndef __EMSCRIPTEN__ sodium_memzero(((unsigned char *)buf) - 8, 8U); sodium_mprotect_readonly(buf); sodium_free(buf); printf("Underflow not caught\n"); - +#endif return 0; }