mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 00:21:11 +02:00
Guard against pointer overrun if sock is set negative
This commit is contained in:
parent
439dfc6886
commit
3d9d881920
|
@ -2869,7 +2869,7 @@ int run_edge_loop (n2n_edge_t *eee) {
|
|||
// any or all of the FDs could have input; check them all
|
||||
|
||||
// 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,
|
||||
pktbuf, &expected, &position,
|
||||
now)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user