HomeFreeBSD

MFC r299879, r299880

Description

MFC r299879, r299880

r299879 | truckman | 2016-05-15 18:30:32 -0700 (Sun, 15 May 2016) | 7 lines

Likely a false positive ... but make sure that -1 can't be used as an
array index by splitting up a test.

r299880 | truckman | 2016-05-15 18:38:24 -0700 (Sun, 15 May 2016) | 8 lines

Since rdata is only used as an argument to the immediately following
call to res_nopt_rdata(), revert r299879 and fix CID 603941 by moving
rdata = &buf[n];
inside the if block.

Reported by: Coverity
CID: 603941

Details

Provenance
truckmanAuthored on
Parents
rS300285: MFC r299873
Branches
Unknown
Tags
Unknown