From 854d3bc9a71b1b7304a59e5e74200c7137b9acf5 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 2 Sep 2020 21:27:46 -0400 Subject: [PATCH] Fix bug in patty_ax25_if_addr_add() Fix bug in patty_ax25_if_addr_add() wherein, due to a typo of memcpy() rather than memcmp(), the function would never fail to add an address to an interface, even if it already exists on the interface --- src/if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/if.c b/src/if.c index a8d4d7e..9a40546 100644 --- a/src/if.c +++ b/src/if.c @@ -165,7 +165,7 @@ static patty_ax25_addr *find_addr(patty_ax25_if *iface, while (item) { patty_ax25_addr *cur = item->value; - if (memcpy(&addr->callsign, + if (memcmp(&addr->callsign, &cur->callsign, sizeof(addr->callsign)) == 0) { return addr;