summaryrefslogtreecommitdiffstats
path: root/sdcard
diff options
context:
space:
mode:
authorTerry Heo (Woncheol) <terryheo@google.com>2011-03-16 13:02:05 +0900
committerTerry Heo (Woncheol) <terryheo@google.com>2011-03-16 13:10:08 +0900
commit8349cce829388503fae67d454aff6a544ccd36aa (patch)
treeb2ae33e0f82d2b8ec5a6610f58f6aced3a487de7 /sdcard
parentd6851475e0bc104e18a8d7cbcb1abd081f7f94a0 (diff)
downloadcore-8349cce829388503fae67d454aff6a544ccd36aa.tar.gz
core-8349cce829388503fae67d454aff6a544ccd36aa.tar.bz2
core-8349cce829388503fae67d454aff6a544ccd36aa.zip
Fix uninitialized variable bug in sdcard emulator
- Following members were not initialized in fuse_init(). fuse->root.actual_name fuse->root.gen - Initialize fuse->root with memset(). Change-Id: I4bce754ace608b526961f59049b2d780fd99756f
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 0b8f656c5..fd003a7fd 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -326,15 +326,9 @@ void fuse_init(struct fuse *fuse, int fd, const char *path)
fuse->all = &fuse->root;
+ memset(&fuse->root, 0, sizeof(fuse->root));
fuse->root.nid = FUSE_ROOT_ID; /* 1 */
- fuse->root.next = 0;
- fuse->root.child = 0;
- fuse->root.parent = 0;
-
- fuse->root.all = 0;
fuse->root.refcount = 2;
-
- fuse->root.name = 0;
rename_node(&fuse->root, path);
}