mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
error.c (mrb_vformat): prevent SEGV from %s with NULL
This commit is contained in:
@@ -329,6 +329,7 @@ mrb_vformat(mrb_state *mrb, const char *format, va_list ap)
|
||||
goto L_cat_obj;
|
||||
case 's':
|
||||
chars = va_arg(ap, char*);
|
||||
if (chars == NULL) chars = "(null)";
|
||||
len = strlen(chars);
|
||||
goto L_cat;
|
||||
case 't':
|
||||
|
||||
Reference in New Issue
Block a user