Append \0 to every name string in aot name section (#3249)
Since strings in .name section in .wasm is not c-style, need to append a `\0` to each string in .name section in AOT file when emitting.
This commit is contained in:
@ -4923,7 +4923,7 @@ load_user_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module,
|
||||
}
|
||||
|
||||
#if WASM_ENABLE_CUSTOM_NAME_SECTION != 0
|
||||
if (memcmp(p, "name", 4) == 0) {
|
||||
if (name_len == 4 && memcmp(p, "name", 4) == 0) {
|
||||
module->name_section_buf = buf;
|
||||
module->name_section_buf_end = buf_end;
|
||||
p += name_len;
|
||||
|
||||
Reference in New Issue
Block a user