diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-11-26 09:57:48 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-11-26 09:57:48 +0900 |
| commit | f66635069495cfefaa58a99833969e7982c6976d (patch) | |
| tree | a50fe16789a8273ccbb65c456ebb3a125842f99f /mrbgems/mruby-time/src/time.c | |
| parent | 0ee58a0fffd29149e30497f1f10305f8448ba0d9 (diff) | |
| parent | b7f9a58757bdf30e9d64191ac47d81144e3f6098 (diff) | |
| download | mruby-f66635069495cfefaa58a99833969e7982c6976d.tar.gz mruby-f66635069495cfefaa58a99833969e7982c6976d.zip | |
Merge pull request #3295 from bouk/time-seg
Fix null pointer dereference in mrb_time_initialize
Diffstat (limited to 'mrbgems/mruby-time/src/time.c')
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 5c23bd44a..dfd4450da 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -587,14 +587,14 @@ mrb_time_initialize(mrb_state *mrb, mrb_value self) int n; struct mrb_time *tm; + n = mrb_get_args(mrb, "|iiiiiii", + &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec); tm = (struct mrb_time*)DATA_PTR(self); if (tm) { mrb_free(mrb, tm); } mrb_data_init(self, NULL, &mrb_time_type); - n = mrb_get_args(mrb, "|iiiiiii", - &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec); if (n == 0) { tm = current_mrb_time(mrb); } |
