]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r299879, r299880
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 20 May 2016 07:18:33 +0000 (07:18 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 20 May 2016 07:18:33 +0000 (07:18 +0000)
commitd13ee748a5bdd54ad164bf029b23c8f01d724390
treecb04a2d6ace178de8da90f89d1df4afdcd6fa90a
parent4a01250ed10e676573c21c143c958d61c2f7994e
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@300286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/resolv/res_query.c