Skip to content

Commit

Permalink
Protect against SEGV when nvalid calling sequence is used.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jul 13, 2017
1 parent f7372e2 commit 972ffff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/XrdSsi/XrdSsiRequest.cc
Expand Up @@ -37,6 +37,12 @@
#include "XrdSsi/XrdSsiRequest.hh"
#include "XrdSsi/XrdSsiStream.hh"

/******************************************************************************/
/* S t a t i c M e m b e r s */
/******************************************************************************/

XrdSsiMutex XrdSsiRequest::ubMutex;

/******************************************************************************/
/* Private: C o p y D a t a */
/******************************************************************************/
Expand Down
4 changes: 3 additions & 1 deletion src/XrdSsi/XrdSsiRequest.hh
Expand Up @@ -306,7 +306,7 @@ static RDR_Info RestartDataResponse(RDR_How rhow, const char *reqid=0);
//-----------------------------------------------------------------------------

XrdSsiRequest(const char *reqid=0, uint16_t tmo=0)
: reqID(reqid), rrMutex(0),
: reqID(reqid), rrMutex(&ubMutex),
theRespond(0), epNode(0),
detTTL(0), tOut(0) {}

Expand Down Expand Up @@ -372,6 +372,8 @@ virtual void BindDone() {}
bool CopyData(char *buff, int blen);
virtual void Unbind(XrdSsiResponder *respP) {}

static
XrdSsiMutex ubMutex;
const char *reqID;
XrdSsiMutex *rrMutex;
XrdSsiRequest *nextRequest;
Expand Down

0 comments on commit 972ffff

Please sign in to comment.