]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a potential garbage jump
authorRoy Marples <roy@marples.name>
Sat, 7 Jun 2014 21:02:29 +0000 (21:02 +0000)
committerRoy Marples <roy@marples.name>
Sat, 7 Jun 2014 21:02:29 +0000 (21:02 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index ce0cc62b99e74b2a3ab708afb2e4ff7f0fc568fd..2c1280f4ac5a35981014f26104b362ced338298c 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -206,6 +206,7 @@ ipv6_readsecret(struct dhcpcd_ctx *ctx)
        int x;
 
        if ((fp = fopen(SECRET, "r"))) {
+               len = 0;
                while (fgets(line, sizeof(line), fp)) {
                        len = strlen(line);
                        if (len) {