[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Fix F_DUPFD_CLOEXEC operation args

On 05/03/2013 06:06 AM, Eric Blake wrote:
> On 05/03/2013 04:12 AM, Daniel P. Berrange wrote:
>> From: "Daniel P. Berrange" <berrange redhat com>
>> The F_DUPFD_CLOEXEC operation with fcntl() expects a single
>> int argument, specifying the minimum FD number for the newly
>> dup'd file descriptor. We were not specifying that causing
>> random stack data to be accessed as the FD number. Sometimes
>> that worked, sometimes it didn't.
>> Signed-off-by: Daniel P. Berrange <berrange redhat com>
>> ---
>>  src/rpc/virnetsocket.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> Bug introduced in commit f4287c76 in Aug 2011.  ACK.

I feel stupid for my poor review of this:

A cast is not needed (the arg is int, not long), but the arg IS needed,
just as F_DUPFD needs an arg.
/me goes and hangs head in shame for a few minutes ;(

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]