File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -4392,15 +4392,16 @@ static inline void
43924392gc_mark_check_t_none (rb_objspace_t * objspace , VALUE obj )
43934393{
43944394 if (RB_UNLIKELY (RB_TYPE_P (obj , T_NONE ))) {
4395- char obj_info_buf [256 ];
4396- rb_raw_obj_info (obj_info_buf , 256 , obj );
4395+ enum {info_size = 256 };
4396+ char obj_info_buf [info_size ];
4397+ rb_raw_obj_info (obj_info_buf , info_size , obj );
43974398
4398- char parent_obj_info_buf [256 ];
4399+ char parent_obj_info_buf [info_size ];
43994400 if (objspace -> rgengc .parent_object == Qfalse ) {
4400- strcpy (parent_obj_info_buf , "(none)" );
4401+ strlcpy (parent_obj_info_buf , "(none)" , info_size );
44014402 }
44024403 else {
4403- rb_raw_obj_info (parent_obj_info_buf , 256 , objspace -> rgengc .parent_object );
4404+ rb_raw_obj_info (parent_obj_info_buf , info_size , objspace -> rgengc .parent_object );
44044405 }
44054406
44064407 rb_bug ("try to mark T_NONE object (obj: %s, parent: %s)" , obj_info_buf , parent_obj_info_buf );
You can’t perform that action at this time.
0 commit comments