mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 20:45:17 -07:00
Don't expect signals to work in Javascript
This commit is contained in:
parent
69e3674c29
commit
5437f8974d
@ -67,10 +67,11 @@ int main(void)
|
|||||||
buf = sodium_malloc(size);
|
buf = sodium_malloc(size);
|
||||||
sodium_mprotect_readonly(buf);
|
sodium_mprotect_readonly(buf);
|
||||||
sodium_mprotect_readwrite(buf);
|
sodium_mprotect_readwrite(buf);
|
||||||
|
#ifndef __EMSCRIPTEN__
|
||||||
sodium_memzero(((unsigned char *)buf) + size, 1U);
|
sodium_memzero(((unsigned char *)buf) + size, 1U);
|
||||||
sodium_mprotect_noaccess(buf);
|
sodium_mprotect_noaccess(buf);
|
||||||
sodium_free(buf);
|
sodium_free(buf);
|
||||||
printf("Overflow not caught\n");
|
printf("Overflow not caught\n");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,11 @@ int main(void)
|
|||||||
buf = sodium_malloc(size);
|
buf = sodium_malloc(size);
|
||||||
sodium_mprotect_noaccess(buf);
|
sodium_mprotect_noaccess(buf);
|
||||||
sodium_mprotect_readwrite(buf);
|
sodium_mprotect_readwrite(buf);
|
||||||
|
#ifndef __EMSCRIPTEN__
|
||||||
sodium_memzero(((unsigned char *)buf) - 8, 8U);
|
sodium_memzero(((unsigned char *)buf) - 8, 8U);
|
||||||
sodium_mprotect_readonly(buf);
|
sodium_mprotect_readonly(buf);
|
||||||
sodium_free(buf);
|
sodium_free(buf);
|
||||||
printf("Underflow not caught\n");
|
printf("Underflow not caught\n");
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user