Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for XrdOssReloc int overflow bug #95

Merged
merged 1 commit into from
Mar 11, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/XrdOss/XrdOssReloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ int XrdOssSys::Reloc(const char *tident, const char *path,
pendFiles PF(pbuff, tbuff);
XrdOssCache::allocInfo aInfo(path, pbuff, sizeof(pbuff));
int rc, lblen, datfd, Pure = (anchor && !strcmp(anchor, "."));
off_t rc_c;
struct stat buf;

// Generate the actual local path for this file.
Expand Down Expand Up @@ -144,7 +145,7 @@ int XrdOssSys::Reloc(const char *tident, const char *path,
// Copy the original file to the new location. Copy() always closes the fd.
//
PF.datfd = -1;
if ((rc = XrdOssCopy::Copy(local_path, pbuff, datfd)) < 0) return rc;
if ((rc_c = XrdOssCopy::Copy(local_path, pbuff, datfd)) < 0) return (int)rc_c;

// If the file is to be merely copied, substitute the desired destination
//
Expand Down