mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2024-11-26 15:32:05 +00:00
Output warning and quit if import/export name contains '\00' (#2806)
Leave it as a limitation when import/export name contains '\00' in wasm file. p.s. https://github.com/bytecodealliance/wasm-micro-runtime/issues/2789
This commit is contained in:
parent
873558c40e
commit
718f0671e7
|
@ -301,7 +301,13 @@ check_utf8_str(const uint8 *str, uint32 len)
|
|||
|
||||
while (p < p_end) {
|
||||
chr = *p;
|
||||
if (chr < 0x80) {
|
||||
|
||||
if (chr == 0) {
|
||||
LOG_WARNING(
|
||||
"LIMITATION: a string which contains '\\00' is unsupported");
|
||||
return false;
|
||||
}
|
||||
else if (chr < 0x80) {
|
||||
p++;
|
||||
}
|
||||
else if (chr >= 0xC2 && chr <= 0xDF && p + 1 < p_end) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user