From a4822168b7059c4c6c412cf1aaf630ec2fe554b5 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Tue, 19 May 2026 14:32:15 +0200 Subject: [PATCH] make clanker happy --- lib/parse_mac.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/parse_mac.cc b/lib/parse_mac.cc index 3d1ea47..2364dae 100644 --- a/lib/parse_mac.cc +++ b/lib/parse_mac.cc @@ -109,10 +109,14 @@ public: // DATA if ((((h->frame_control) >> 2) & 63) == 2) { - print_ascii(frame + 24, frame_len - 24); + if (frame_len >= 24) { + print_ascii(frame + 24, frame_len - 24); + } // QoS Data } else if ((((h->frame_control) >> 2) & 63) == 34) { - print_ascii(frame + 26, frame_len - 26); + if (frame_len >= 26) { + print_ascii(frame + 26, frame_len - 26); + } } message_port_pub(pmt::mp("out"), pmt::cons(d_meta, d_msg));