1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-03 12:35:02 +00:00

A better fix for the PacketAliasProxyRule() call.

Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
This commit is contained in:
Brian Somers 2001-02-10 17:26:14 +00:00
parent 1bd7723d09
commit 49ed07a3c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72322

View File

@ -304,15 +304,15 @@ nat_ProxyRule(struct cmdargs const *arg)
for (f = arg->argn, pos = 0; f < arg->argc; f++) {
len = strlen(arg->argv[f]);
if (sizeof cmd - pos < len + (f ? 1 : 0))
if (sizeof cmd - pos < len + (len ? 1 : 0))
break;
if (f)
if (len)
cmd[pos++] = ' ';
strcpy(cmd + pos, arg->argv[f]);
pos += len;
}
return PacketAliasProxyRule(cmd + strspn(cmd, " \t"));
return PacketAliasProxyRule(cmd);
}
int