clausklein / rpms / tftp

Forked from rpms/tftp 5 years ago
Clone
364356
diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c
364356
--- tftp-hpa-0.49/tftpd/remap.c.zero	2008-10-20 18:08:31.000000000 -0400
364356
+++ tftp-hpa-0.49/tftpd/remap.c	2008-11-25 11:41:09.000000000 -0500
364356
@@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f)
364356
     int lineno = 0;
364356
     int err = 0;
364356
 
364356
+    memset(this_rule, '\0', sizeof(struct rule));
364356
     while (lineno++, fgets(line, MAXLINE, f)) {
364356
         rv = parseline(line, this_rule, lineno);
364356
         if (rv < 0)
364356
@@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f)
364356
             *last_rule = this_rule;
364356
             last_rule = &this_rule->next;
364356
             this_rule = tfmalloc(sizeof(struct rule));
364356
+            memset(this_rule, '\0', sizeof(struct rule));
364356
         }
364356
     }
364356