Skip to contentSkip to conversation

Fix a flaw in printing the MAC

PATCH In review Joerg Marx 2 participants 2 messages Feb 17, 2011

Subsystems (2)
lore
Share & tools
lore

Joerg Marx

author
#0 lore raw

PATCH 1/1 Fix a flaw in printing the MAC

The flaw was in skipping the second byte in MAC header due to increasing the pointer AND indexed access starting at '1'.

---
 net/ipv6/netfilter/ip6t_LOG.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv6/netfilter/ip6t_LOG.c +1 -1
index 09c8889..de33803 100644
@@ -410,7 +410,7 @@ fallback:
                if (p != NULL) {
                        sb_add(m, "%02x", *p++);
                        for (i = 1; i < len; i++)
-                               sb_add(m, ":%02x", p[i]);
+                               sb_add(m, ":%02x", *p++);
                }
                sb_add(m, " ");
 
Signature · 1 line
1.7.1