From f0a2d256fc56bf87cfc7588d018fc7dbcf2503ae Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Fri, 1 Feb 2013 09:25:32 +0100 Subject: [PATCH] Fix segfault --- src/ra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ra.c b/src/ra.c index 2149a66..47a2a8d 100644 --- a/src/ra.c +++ b/src/ra.c @@ -275,7 +275,7 @@ bool ra_process(void) size_t ra_dns_len; struct odhcp6c_entry *entry = odhcp6c_get_state(STATE_RA_DNS, &ra_dns_len); - for (size_t i = 0; i < len / sizeof(*entry); ++i) + for (size_t i = 0; i < ra_dns_len / sizeof(*entry); ++i) if (IN6_ARE_ADDR_EQUAL(&entry[i].router, &from.sin6_addr) && entry[i].valid > router_valid) entry[i].valid = router_valid; -- 2.25.1