Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix integer shift overflow if both tcp_socket and udp_socket are set
The problem occurs if at the start of the loop the sockindex is at the last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and tcp_socket are valid, sockindex gets incremented for UDP first and points one entry behind the array for the tcp block. So the fix is to check after every increment of sockindex if it is still valid. Fix Coverity error CID 56878 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
- Loading branch information