mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add assertion before casting
This commit is contained in:
@@ -719,6 +719,7 @@ attrsym(codegen_scope *s, mrb_sym a)
|
||||
+ 1 /* '=' */
|
||||
+ 1 /* '\0' */
|
||||
);
|
||||
mrb_assert(len <= SIZE_MAX);
|
||||
memcpy(name2, name, (size_t)len);
|
||||
name2[len] = '=';
|
||||
name2[len+1] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user