jdwp: switch to libbase's ReceiveFileDescriptors.
There are some missing checks in the previous use of cmsg(3) to receive
file descriptors, which could result in an fd leak (if we received two
file descriptors, since CMSG_SPACE(4) == CMSG_SPACE(8) on 64-bit).
This isn't actually a real issue, because the other end is trusted to do
the right thing, but switch this over to avoid cargo-cult copy/paste
into places where we don't trust the other side.
Bug: http://b/122047630
Test: treehugger
Change-Id: I53347805b91e5a36c20ab42e6761412270ea6c8e
1 file changed