File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
branches/try/src/librustuv Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5
- refs/heads/try: aa78c3d6f6b25a0e54f815cd8db765000763e48a
5
+ refs/heads/try: 497d63f0bcc6436ae5a5f824946caca8f6d6fb53
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -256,7 +256,9 @@ impl FsRequest {
256
256
let path = unsafe { Path :: new ( CString :: new ( path, false ) ) } ;
257
257
let stat = self . get_stat ( ) ;
258
258
fn to_msec ( stat : uvll:: uv_timespec_t ) -> u64 {
259
- ( stat. tv_sec * 1000 + stat. tv_nsec / 1000000 ) as u64
259
+ // Be sure to cast to u64 first to prevent overflowing if the tv_sec
260
+ // field is a 32-bit integer.
261
+ ( stat. tv_sec as u64 ) * 1000 + ( stat. tv_nsec as u64 ) / 1000000
260
262
}
261
263
let kind = match ( stat. st_mode as c_int ) & libc:: S_IFMT {
262
264
libc:: S_IFREG => io:: TypeFile ,
You can’t perform that action at this time.
0 commit comments