From a83a1ca5f5d8ec960db6921dc8162bbd7de30dd2 Mon Sep 17 00:00:00 2001 From: wb2osz Date: Fri, 18 Oct 2024 17:41:55 +0100 Subject: [PATCH] Issue 550: Remove extra trailing nul for Send Unproto Via. --- src/server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 023e43f..a54dd6b 100644 --- a/src/server.c +++ b/src/server.c @@ -1769,7 +1769,11 @@ static THREAD_F cmd_listen_thread (void *arg) break; } - ax25_set_info (pp, (unsigned char*)p, data_len - ndigi * 10); + // Issue 550: Info part was one byte too long resulting in an extra nul character. + // Original calculation was data_len-ndigi*10 but we need to subtract one + // for first byte which is number of digipeaters. + ax25_set_info (pp, (unsigned char*)p, data_len - ndigi * 10 - 1); + // Issue 527: NET/ROM routing broadcasts use PID 0xCF which was not preserved here. ax25_set_pid (pp, pid);