Fix regression decoding control bytes
This commit is contained in:
parent
cc21e6342b
commit
e30f4bfb07
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue