[syslinux] tftpd remap rules

Peter Jones pjones at redhat.com
Wed Mar 16 13:37:56 PST 2005


Hi,

Without this patch, I get a "remap rules cannot be inverted" error
message with any remap rule:

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

-- 
        Peter




More information about the Syslinux mailing list