1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use RSTRING_LENINT for overflow check

This commit is contained in:
Nobuyoshi Nakada 2020-09-01 19:03:41 +09:00
parent 21ad4075a7
commit 8d1de3154c
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

2
gc.c
View file

@ -11667,7 +11667,7 @@ rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
}
break;
case T_STRING: {
APPENDF((BUFF_ARGS, "%.*s", (int)RSTRING_LEN(obj), RSTRING_PTR(obj)));
APPENDF((BUFF_ARGS, "%.*s", RSTRING_LENINT(obj), RSTRING_PTR(obj)));
break;
}
case T_MOVED: {