From e30f4bfb0784f9295e773f493b8f9f08cffef571 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sun, 28 Jun 2020 22:40:56 -0400 Subject: [PATCH] Fix regression decoding control bytes --- src/frame.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/frame.c b/src/frame.c index 4d5def2..bcd0906 100644 --- a/src/frame.c +++ b/src/frame.c @@ -118,9 +118,9 @@ error: } static ssize_t decode_info(patty_ax25_frame *frame, - void *data, - off_t offset, - size_t size) { + void *data, + off_t offset, + size_t size) { uint8_t control = ((uint8_t *)data + offset)[0]; size_t decoded = 0; @@ -132,7 +132,7 @@ static ssize_t decode_info(patty_ax25_frame *frame, if (PATTY_AX25_CONTROL_UNNUMBERED_INFO(control)) { info = 1; } - } else { + } else if (!PATTY_AX25_CONTROL_SUPER(control)) { errno = EINVAL; goto error;