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

login
register
mail settings
Submitter Cédric Le Goater
Date Feb. 7, 2014, 9:21 a.m.
Message ID <1391764884-3929-1-git-send-email-clg@fr.ibm.com>
Download mbox | patch
Permalink /patch/327259/
State New
Headers show

Comments

Cédric Le Goater - Feb. 7, 2014, 9:21 a.m.
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
---
 second/file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

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",