URL:
<http://savannah.cern.ch/bugs/?77393>
Summary: xrd cmd prints extra characters for getchecksum
command
Project: XROOTD
Submitted by: wilko
Submitted on: 2011-01-25 19:26
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Running the command:
> xrd <srv> getchecksum <filename>
Checksum: crc32 3093407669▒
prints extra character after the checksum value.
It looks like when calling (in src/XrdClient/XrdCommandLine.cc)
genadmin->GetChecksum((kXR_char *)pathname.c_str(), &ans);
the string "ans" is not terminated with null or at least not in the proper
place. Should the data length returned by GetChecksum() be used?
int dlen = genadmin->GetChecksum((kXR_char *)pathname.c_str(),&ans);
char *cksum_line = strndup((const char*) ans, dlen);
Cheers,
Wilko
_______________________________________________________
Reply to this item at:
<http://savannah.cern.ch/bugs/?77393>
_______________________________________________
Message sent via/by LCG Savannah
http://savannah.cern.ch/
|