mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 12:12:10 +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".
|
free == 0 case as "both of these are invalid".
|
||||||
*/
|
*/
|
||||||
#ifndef G_OS_WIN32
|
#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;
|
no_size = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user