[PATCH 1/2] fix memset size when opening a file

Cédric Le Goater clg at fr.ibm.com
Fri Feb 7 20:21:43 EST 2014


Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
---
 second/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/second/file.c b/second/file.c
index 8412075689e0..cb79e7877282 100644
--- a/second/file.c
+++ b/second/file.c
@@ -667,7 +667,7 @@ int open_file(struct boot_fspec_t* spec, struct boot_file_t* file)
 {
      int result;
 
-     memset(file, 0, sizeof(struct boot_file_t*));
+     memset(file, 0, sizeof(*file));
      file->fs        = &fs_default;
 
      DEBUG_F("dev_path = %s\nfile_name = %s\npartition = %d\n",
-- 
1.7.10.4



More information about the Yaboot-devel mailing list