Skip to content

Commit

Permalink
wasm_application.c: Avoid null pointer dereference (#3620)
Browse files Browse the repository at this point in the history
  • Loading branch information
HongxiaWangSSSS authored Jul 12, 2024
1 parent c254bff commit 7affac0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/iwasm/common/wasm_application.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ execute_func(WASMModuleInstanceCommon *module_inst, const char *name,
bh_memcpy_s(&u.val, sizeof(double), &ud.d,
sizeof(double));
}
if (endptr[0] == ':') {
if (endptr && endptr[0] == ':') {
uint64 sig;
union ieee754_double ud;
sig = strtoull(endptr + 1, &endptr, 0);
Expand Down

0 comments on commit 7affac0

Please sign in to comment.