Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | Patch originally from Fedora |
| 2 | |
| 3 | http://pkgs.fedoraproject.org/cgit/tftp.git/ |
| 4 | |
| 5 | Upstream-Status: Pending |
| 6 | |
| 7 | diff -up tftp-hpa-0.49/tftpd/remap.c.zero tftp-hpa-0.49/tftpd/remap.c |
| 8 | --- tftp-hpa-0.49/tftpd/remap.c.zero 2008-10-20 18:08:31.000000000 -0400 |
| 9 | +++ tftp-hpa-0.49/tftpd/remap.c 2008-11-25 11:41:09.000000000 -0500 |
| 10 | @@ -286,6 +286,7 @@ struct rule *parserulefile(FILE * f) |
| 11 | int lineno = 0; |
| 12 | int err = 0; |
| 13 | |
| 14 | + memset(this_rule, '\0', sizeof(struct rule)); |
| 15 | while (lineno++, fgets(line, MAXLINE, f)) { |
| 16 | rv = parseline(line, this_rule, lineno); |
| 17 | if (rv < 0) |
| 18 | @@ -294,6 +295,7 @@ struct rule *parserulefile(FILE * f) |
| 19 | *last_rule = this_rule; |
| 20 | last_rule = &this_rule->next; |
| 21 | this_rule = tfmalloc(sizeof(struct rule)); |
| 22 | + memset(this_rule, '\0', sizeof(struct rule)); |
| 23 | } |
| 24 | } |
| 25 | |