The return value(long int) of strict_strtol is too small for unstriped
object.
Signed-off-by: Dongmao Zhang <deanraccoon@gmail.com>
(cherry picked from commit
fe6679dca479fc24806d7e57ab0108a516cd6d55)
std::string err;
// this intermediate string allows to add a null terminator before calling strtol
std::string strsize(bl.c_str(), bl.length());
- *psize = strict_strtol(strsize.c_str(), 10, &err);
+ *psize = strict_strtoll(strsize.c_str(), 10, &err);
if (!err.empty()) {
lderr(cct()) << XATTR_SIZE << " : " << err << dendl;
return -EINVAL;