Skip to content

Commit

Permalink
[XrdPss] Fix potential null pointer dereference in copyCGI
Browse files Browse the repository at this point in the history
  • Loading branch information
amadio committed Nov 26, 2024
1 parent 58bb106 commit 9611aa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/XrdPss/XrdPssUrlInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ int copyCGI(const char *cgi, char *Buff, int Blen)
{
int n;

//std::cerr <<"PSS cgi IN: '" <<cgi <<"' " <<strlen(cgi) <<'\n' <<std::flush;
if (!cgi) {*Buff = 0; return 0;}

// Skip over initial ampersands
//
while(*cgi == '&' && *cgi) cgi++;

// Check if there is anything here
//
if (!cgi || *cgi == 0) {*Buff = 0; return 0;}
if (*cgi == 0) {*Buff = 0; return 0;}

// Copy out all variables omitting the ones that cause trouble
//
Expand Down

0 comments on commit 9611aa2

Please sign in to comment.