projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06de24f
)
Avoid reading uninitialized memory
author
Alexander Larsson
<alexl@redhat.com>
Mon, 7 Sep 2009 10:50:58 +0000
(12:50 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Mon, 7 Sep 2009 10:50:58 +0000
(12:50 +0200)
If the statfs call fails, don't look at the result.
gio/glocalfile.c
patch
|
blob
|
history
diff --git
a/gio/glocalfile.c
b/gio/glocalfile.c
index
8ed1e09
..
bb14315
100644
(file)
--- 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