mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
buffer overrun fix by Sergei Golovin <golovin.sv@gmail.com>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37489 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1c5249ce95
commit
0c46b4715a
1 changed files with 8 additions and 0 deletions
|
@ -206,10 +206,18 @@ static char *buildURL(parsedURL *base, parsedURL *rel, BOOL standardize)
|
|||
int l;
|
||||
unsigned int len = 1;
|
||||
|
||||
if (NO == rel->hasNoPath)
|
||||
{
|
||||
len += 1; // trailing '/' to be added
|
||||
}
|
||||
if (rel->scheme != 0)
|
||||
{
|
||||
len += strlen(rel->scheme) + 3; // scheme://
|
||||
}
|
||||
else if (YES == rel->isGeneric)
|
||||
{
|
||||
len += 2; // need '//' even if no scheme
|
||||
}
|
||||
if (rel->user != 0)
|
||||
{
|
||||
len += strlen(rel->user) + 1; // user...@
|
||||
|
|
Loading…
Reference in a new issue