From 5a832596a59d1055f59620d43fbb740955ce6787 Mon Sep 17 00:00:00 2001 From: Guilherme Amadio Date: Mon, 13 Feb 2023 14:13:17 +0100 Subject: [PATCH] Revert "[XrdCl] Make sure error message does not include a null-character." This reverts commit 22d308a3dd689607ee0396860d377145836ef55b. --- src/XrdCl/XrdClXRootDMsgHandler.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/XrdCl/XrdClXRootDMsgHandler.cc b/src/XrdCl/XrdClXRootDMsgHandler.cc index d31f050e520..9a1f433bfb9 100644 --- a/src/XrdCl/XrdClXRootDMsgHandler.cc +++ b/src/XrdCl/XrdClXRootDMsgHandler.cc @@ -1225,9 +1225,7 @@ namespace XrdCl if( pStatus.code == errErrorResponse ) { st->errNo = rsp->body.error.errnum; - // omit the last character as the string returned from the server - // (acording to protocol specs) should be null-terminated - std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-5 ); + std::string errmsg( rsp->body.error.errmsg, rsp->hdr.dlen-4 ); if( st->errNo == kXR_noReplicas && !pLastError.IsOK() ) errmsg += " Last seen error: " + pLastError.ToString(); st->SetErrorMessage( errmsg );