Project

General

Profile

Actions

Backport #5596

closed

Windows上でFile.utimeにtime_tの負の値を与えるとSEGV

Added by dearblue (宗介 相良) over 12 years ago. Updated about 12 years ago.

Status:
Closed
Assignee:
-
[ruby-dev:44838]

Description

Windows 上で File.utime に time_t の負の値を与えると SEGV します。

ruby -e "t = Time.at(-1); File.utime(t, t, '.')"
-e:1: [BUG] Segmentation fault

原因は win32/win32.c の unixtime_to_filetime で呼び出される localtime 関数の戻り値を確認していないため、NULL ポインタを参照するためです。

対応をお願いします。

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0