Fix NULL dereference
Fix NULL dereference when handling REJ packets
This commit is contained in:
parent
ea68dc199b
commit
512957dda1
1 changed files with 3 additions and 1 deletions
|
@ -1492,12 +1492,14 @@ static int handle_rej(patty_ax25_server *server,
|
|||
patty_ax25_sock *sock,
|
||||
patty_ax25_frame *frame) {
|
||||
unsigned int i,
|
||||
end = sock->vs;
|
||||
end;
|
||||
|
||||
if (sock == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
end = sock->vs;
|
||||
|
||||
if (frame->nr > end) {
|
||||
end += (sock->mode == PATTY_AX25_SOCK_SABME)? 128: 8;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue