core/iwasm/interpreter/wasm_loader.c: remove an extra validation (#2845)

* Empty names are spec-wise valid.
* As we ignore unknown custom sections anyway, it's safe to
  accept empty names here.
* Currently, the problem is not exposed on our CI because
   the wabt version used there is a bit old.
This commit is contained in:
YAMAMOTO Takashi 2023-12-01 19:29:15 +09:00 committed by GitHub
parent fbd9a760e7
commit 73914caa9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2708,7 +2708,7 @@ load_user_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module,
read_leb_uint32(p, p_end, name_len);
if (name_len == 0 || p + name_len > p_end) {
if (p + name_len > p_end) {
set_error_buf(error_buf, error_buf_size, "unexpected end");
return false;
}