mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 12:36:01 -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);
|
||||
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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user