utimensat: do not reference an out-of-scope buffer
authorJim Meyering <meyering@redhat.com>
Tue, 24 May 2011 16:24:24 +0000 (18:24 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 24 May 2011 16:24:24 +0000 (18:24 +0200)
commit6dc42e2d25df9c84b335062bad9beb0a7319647b
tree0853b81d114ce6413eeb8103b013c4d5ea72504c
parentd94bbd1eb1fc483d72397ec5dd94f7e885e12440
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"
ChangeLog
lib/utimensat.c