wasm_application.c: Avoid null pointer dereference (#3620)
This commit is contained in:
@ -513,7 +513,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
|
|||||||
bh_memcpy_s(&u.val, sizeof(double), &ud.d,
|
bh_memcpy_s(&u.val, sizeof(double), &ud.d,
|
||||||
sizeof(double));
|
sizeof(double));
|
||||||
}
|
}
|
||||||
if (endptr[0] == ':') {
|
if (endptr && endptr[0] == ':') {
|
||||||
uint64 sig;
|
uint64 sig;
|
||||||
union ieee754_double ud;
|
union ieee754_double ud;
|
||||||
sig = strtoull(endptr + 1, &endptr, 0);
|
sig = strtoull(endptr + 1, &endptr, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user