Skip to content

Commit

Permalink
Reject incompatible versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja authored and abh3 committed Jun 30, 2016
1 parent a8aed6f commit 8d8c530
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/XrdFileCache/XrdFileCacheInfo.cc
Expand Up @@ -86,7 +86,13 @@ int Info::Read(XrdOssDF* fp, bool init_prefetch_buff )
// before File::Run() starts

int off = 0;
off += fp->Read(&m_version, off, sizeof(int));
int version;
off += fp->Read(&version, off, sizeof(int));
if (version != m_version) {
clLog()->Dump(XrdCl::AppMsg, "Info:::Read(), incomatible file version");
return 0;
}

off += fp->Read(&m_bufferSize, off, sizeof(long long));
if (off <= 0) return off;

Expand Down

0 comments on commit 8d8c530

Please sign in to comment.