Implement multi-module feature and bulk-memory feature (#271)
Refine wasm loader and aot loader Fix potential issue of os_mmap/os_munmap Update document
This commit is contained in:
@ -32,6 +32,26 @@ b_memcpy_s(void * s1, unsigned int s1max,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int b_memmove_s(void * s1, unsigned int s1max,
|
||||
const void * s2, unsigned int n)
|
||||
{
|
||||
char *dest = (char*)s1;
|
||||
char *src = (char*)s2;
|
||||
if (n == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (s1 == NULL || s1max > RSIZE_MAX) {
|
||||
return -1;
|
||||
}
|
||||
if (s2 == NULL || n > s1max) {
|
||||
memset(dest, 0, s1max);
|
||||
return -1;
|
||||
}
|
||||
memmove(dest, src, n);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
b_strcat_s(char * s1, unsigned int s1max, const char * s2)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user