Browse Source
Merge pull request #1040 from hamishcoleman/dev
Guard against pointer overrun if sock is set negative
pull/1052/head
Hamish Coleman
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/edge_utils.c
|
@ -2877,7 +2877,7 @@ int run_edge_loop (n2n_edge_t *eee) { |
|
|
// any or all of the FDs could have input; check them all
|
|
|
// any or all of the FDs could have input; check them all
|
|
|
|
|
|
|
|
|
// external
|
|
|
// external
|
|
|
if(FD_ISSET(eee->sock, &socket_mask)) { |
|
|
if((eee->sock >= 0) && FD_ISSET(eee->sock, &socket_mask)) { |
|
|
if(0 != fetch_and_eventually_process_data(eee, eee->sock, |
|
|
if(0 != fetch_and_eventually_process_data(eee, eee->sock, |
|
|
pktbuf, &expected, &position, |
|
|
pktbuf, &expected, &position, |
|
|
now)) { |
|
|
now)) { |
|
|