Skip to content

Commit

Permalink
UINT16_MAX as symbol length is reserved; ref #2294
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed May 19, 2014
1 parent 54c2dcf commit c4268f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/symbol.c
Expand Up @@ -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;
Expand Down

0 comments on commit c4268f6

Please sign in to comment.