diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-03 09:52:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-03 09:52:26 +0900 |
| commit | 0c631a4c08371f5c12d2a774e7ab49fd9a3dfbee (patch) | |
| tree | 2be1d61aded15151646b9541443ce5b888289246 /mrbgems/mruby-time | |
| parent | 384209b8dd6fe896dfb42930d1c73e20ad38e5ec (diff) | |
| download | mruby-0c631a4c08371f5c12d2a774e7ab49fd9a3dfbee.tar.gz mruby-0c631a4c08371f5c12d2a774e7ab49fd9a3dfbee.zip | |
time.c: adjust buffer size in `mrb_time_asctime()`.
Diffstat (limited to 'mrbgems/mruby-time')
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
