mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
UINT16_MAX as symbol length is reserved; ref #2294
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ sym_intern(mrb_state *mrb, const char *name, size_t len, mrb_bool lit)
|
||||
mrb_sym sym;
|
||||
char *p;
|
||||
|
||||
if (len > UINT16_MAX) {
|
||||
if (len > (UINT16_MAX-1)) { /* UINT16_MAX is reverved */
|
||||
mrb_raise(mrb, E_ARGUMENT_ERROR, "symbol length too long");
|
||||
}
|
||||
sname.lit = lit;
|
||||
|
||||
Reference in New Issue
Block a user