]> Dogcows Code - chaz/tar/commitdiff
Fix use of uninitialized memory
authorPavel Raiskup <praiskup@redhat.com>
Thu, 15 Aug 2013 10:56:04 +0000 (13:56 +0300)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 15 Aug 2013 10:56:04 +0000 (13:56 +0300)
* src/names.c (name_add_file): Initialize the ep->v.file.fp pointer
after structure allocation.

src/names.c

index f3a35364e06f2673c109e0ab1862fdcdcdf0046d..6c9c3e9265a7793326c3a50b478cf2e4aee64c93 100644 (file)
@@ -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;
 }
 \f
 /* Names from external name file.  */
This page took 0.022326 seconds and 4 git commands to generate.