Skip to content

Commit

Permalink
Properly initialize the extended 2-dimensional Route struct to avoid …
Browse files Browse the repository at this point in the history
…SEGV.
  • Loading branch information
abh3 committed Jan 23, 2014
1 parent 2b92d16 commit 7436da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/XrdXrootd/XrdXrootdConfig.cc
Expand Up @@ -212,6 +212,7 @@ int XrdXrootdProtocol::Configure(char *parms, XrdProtocol_Config *pi)
//
if (!(as_miniosz = as_segsize/2)) as_miniosz = as_segsize;
maxTransz = maxBuffsz = BPool->MaxSize();
memset(Route, 0, sizeof(Route));

// Now process and configuration parameters
//
Expand Down
3 changes: 1 addition & 2 deletions src/XrdXrootd/XrdXrootdProtocol.cc
Expand Up @@ -111,8 +111,7 @@ int XrdXrootdProtocol::myPID = static_cast<int>(getpid());
int XrdXrootdProtocol::myRole = 0;
int XrdXrootdProtocol::myRolf = 0;

struct XrdXrootdProtocol::RD_Table
XrdXrootdProtocol::Route[RD_Num] = {{{0,0},{0,0}}};
struct XrdXrootdProtocol::RD_Table XrdXrootdProtocol::Route[RD_Num];

/******************************************************************************/
/* P r o t o c o l M a n a g e m e n t S t a c k s */
Expand Down

0 comments on commit 7436da2

Please sign in to comment.