Browse Source

Fix use of uninitialized memory

* src/names.c (name_add_file): Initialize the ep->v.file.fp pointer
after structure allocation.
Pavel Raiskup 11 năm trước cách đây
mục cha
commit
69007e652a
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/names.c

+ 1 - 0
src/names.c

@@ -291,6 +291,7 @@ name_add_file (const char *name, int term)
   ep->type = NELT_FILE;
   ep->v.file.name = name;
   ep->v.file.term = term;
+  ep->v.file.fp = NULL;
 }
 
 /* Names from external name file.  */