mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Avoid reading uninitialized memory
If the statfs call fails, don't look at the result.
This commit is contained in:
parent
06de24f430
commit
8af494d987
@ -955,7 +955,8 @@ g_local_file_query_filesystem_info (GFile *file,
|
||||
free == 0 case as "both of these are invalid".
|
||||
*/
|
||||
#ifndef G_OS_WIN32
|
||||
if (statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0)
|
||||
if (statfs_result == 0 &&
|
||||
statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0)
|
||||
no_size = TRUE;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user