Skip to content

Commit

Permalink
Fix fedora build.
Browse files Browse the repository at this point in the history
Fix: error: 'char* strncpy(char*, const char*, size_t)' specified bound
depends on the length of the source argument

Bound passed to strncpy should depend on the size of the destination
buffer!
  • Loading branch information
simonmichal committed Jan 7, 2020
1 parent 356f192 commit 828f439
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrdPss/XrdPssUrlInfo.cc
Expand Up @@ -79,7 +79,7 @@ int copyCGI(const char *cgi, char *Buff, int Blen)
if (beg)
{n = strlen(beg) + 1;
if (n < Blen)
{strncpy(bP, beg, n);
{strncpy(bP, beg, Blen);
bP += n;
}
}
Expand Down

0 comments on commit 828f439

Please sign in to comment.