[glib/wip/pwithnall/wpointer-sign] gstdio: Do not pass wrong pointer types to FILETIME to unix conversion



commit f4604629b481e82dd0686886a157a8535caa82b8
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Tue Jul 12 15:50:59 2022 +0200

    gstdio: Do not pass wrong pointer types to FILETIME to unix conversion

 glib/gstdio.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/glib/gstdio.c b/glib/gstdio.c
index f48263d0a4..8822062e0a 100644
--- a/glib/gstdio.c
+++ b/glib/gstdio.c
@@ -319,6 +319,8 @@ _g_win32_fill_privatestat (const struct __stat64            *statbuf,
                            DWORD                             reparse_tag,
                            GWin32PrivateStat                *buf)
 {
+  gint32 nsecs;
+
   buf->st_dev = statbuf->st_dev;
   buf->st_ino = statbuf->st_ino;
   buf->st_mode = statbuf->st_mode;
@@ -331,9 +333,12 @@ _g_win32_fill_privatestat (const struct __stat64            *statbuf,
 
   buf->reparse_tag = reparse_tag;
 
-  buf->st_ctim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftCreationTime, &buf->st_ctim.tv_nsec);
-  buf->st_mtim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastWriteTime, 
&buf->st_mtim.tv_nsec);
-  buf->st_atim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastAccessTime, 
&buf->st_atim.tv_nsec);
+  buf->st_ctim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftCreationTime, &nsecs);
+  buf->st_ctim.tv_nsec = nsecs;
+  buf->st_mtim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastWriteTime, &nsecs);
+  buf->st_mtim.tv_nsec = nsecs;
+  buf->st_atim.tv_sec = _g_win32_filetime_to_unix_time (&handle_info->ftLastAccessTime, &nsecs);
+  buf->st_atim.tv_nsec = nsecs;
 }
 
 /* Read the link data from a symlink/mountpoint represented


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]