Prevent crash on Windows when data version goes backwards
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 14 Jul 2009 21:49:00 +0000 (17:49 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 14 Jul 2009 21:53:47 +0000 (15:53 -0600)
commitd9445f505ad0fc5a993d954a2d6654785c140351
treec9e9534bfaf32d0c013ce2984cd90b3fa2d03705
parentcdda13eec2a00becb8c2ce5270dd00a0f1097519
Prevent crash on Windows when data version goes backwards

Within cm_MergeStatus() cm_FindVolumeByID() was called with
a NULL pointer instead of a valid cm_req_t object pointer
in the case where the data version for an object received
from the file server is smaller than the value already stored
in the cache.   This results in a NULL pointer dereference.

Allocate a cm_req_t object on the stack and initialize it
before calling cm_FindVolumeByID() in this case.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/83
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_scache.c