bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] utimensat: do not reference an out-of-scope buffer


From: Eric Blake
Subject: Re: [PATCH] utimensat: do not reference an out-of-scope buffer
Date: Tue, 24 May 2011 10:27:46 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10

On 05/24/2011 10:25 AM, Jim Meyering wrote:
> Another coverity-spotted bug.
> Eric, ok to push?
> 
>>From 6dc42e2d25df9c84b335062bad9beb0a7319647b Mon Sep 17 00:00:00 2001
> From: Jim Meyering <address@hidden>
> Date: Tue, 24 May 2011 18:24:24 +0200
> Subject: [PATCH] utimensat: do not reference an out-of-scope buffer
> 
> Otherwise, with __linux__ defined, "times" would point to a buffer, "ts"
> declared in an inner scope, yet "times" would be dereferenced outside
> the scope in which "ts" was valid.
> * lib/utimensat.c (rpl_utimensat) [__linux__]: Move the declaration
> of ts[2] "out/up", so that the use of aliased "times" (via "times = ts;")
> does not end up referencing an out-of-scope "ts"

Gotta love coverity for catching this!  Please push.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]