clausklein / rpms / tftp

Forked from rpms/tftp 5 years ago
Clone

Blame SOURCES/tftp-0.40-remap.patch

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