]> git.neil.brown.name Git - portmap.git/commitdiff
Avoid list corruption in load_table()
authorDenis Zaitceff <zaitceff@gmail.com>
Sat, 24 May 2014 15:27:45 +0000 (21:27 +0600)
committerNeil Brown <neilb@suse.de>
Mon, 26 May 2014 00:18:00 +0000 (10:18 +1000)
load_table() currently swallows the current - last in the list - (*ep) item.
This may be a registration of the UDP port that portmap listens on.

Signed-off-by: Neil Brown <neilb@suse.de>
portmap.c

index 5a935dcaa27f79e93f84663c143ed0ff1f08edb5..ed8e50c7873dd22e5f6930529f18d9a99679394a 100644 (file)
--- a/portmap.c
+++ b/portmap.c
@@ -871,7 +871,7 @@ static void load_table(void)
        struct flagged_pml fpml, *fpmlp;
 
        ep = &pmaplist;
-       while ((*ep)->pml_next)
+       while (*ep)
                ep = & (*ep)->pml_next;
 
        if (store_fd < 0)