From: Alexander Larsson Date: Mon, 7 Sep 2009 10:50:58 +0000 (+0200) Subject: Avoid reading uninitialized memory X-Git-Tag: 2.22.0~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8af494d987b7482865439f882d1375767b57732f;p=platform%2Fupstream%2Fglib.git Avoid reading uninitialized memory If the statfs call fails, don't look at the result. --- diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 8ed1e09..bb14315 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -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