lzaoral / rpms / tftp

Forked from rpms/tftp 2 years ago
Clone
912ab05
--- tftp-hpa-0.40/tftpd/remap.c.old     2005-03-16 16:34:34.000000000 -0500
912ab05
+++ tftp-hpa-0.40/tftpd/remap.c 2005-03-16 16:22:49.000000000 -0500
912ab05
@@ -275,6 +275,7 @@
912ab05
   int lineno = 0;
912ab05
   int err = 0;
912ab05
 
912ab05
+  memset(this_rule, '\0', sizeof(struct rule));
912ab05
   while ( lineno++, fgets(line, MAXLINE, f) ) {
912ab05
     rv = parseline(line, this_rule, lineno);
912ab05
     if ( rv < 0 )
912ab05
@@ -283,6 +284,7 @@
912ab05
       *last_rule = this_rule;
912ab05
       last_rule = &this_rule->next;
912ab05
       this_rule = tfmalloc(sizeof(struct rule));
912ab05
+      memset(this_rule, '\0', sizeof(struct rule));
912ab05
     }
912ab05
   }
912ab05