From 0c631a4c08371f5c12d2a774e7ab49fd9a3dfbee Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 3 Mar 2021 09:52:26 +0900 Subject: time.c: adjust buffer size in `mrb_time_asctime()`. --- mrbgems/mruby-time/src/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-time') diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index dc236849f..5093a73ce 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -702,7 +702,7 @@ mrb_time_asctime(mrb_state *mrb, mrb_value self) # endif len = strlen(buf)-1; /* truncate the last newline */ #else - char buf[256]; + char buf[32]; len = snprintf(buf, sizeof(buf), "%s %s %2d %02d:%02d:%02d %.4d", wday_names[d->tm_wday], mon_names[d->tm_mon], d->tm_mday, -- cgit v1.2.3