clausklein / rpms / tftp

Forked from rpms/tftp 5 years ago
Clone

Blame SOURCES/tftp-0.40-remap.patch

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