ndb/dns: provide v4 argument to parseipmask(), use snprint() instead of sprint()
This commit is contained in:
parent
fd277c053d
commit
b1c9ddb3f0
1 changed files with 3 additions and 3 deletions
|
@ -1013,7 +1013,7 @@ createv4ptrs(void)
|
|||
{
|
||||
int len, dlen, n;
|
||||
char *dom;
|
||||
char buf[Domlen], ipa[48];
|
||||
char buf[Domlen], ipa[64];
|
||||
char *f[40];
|
||||
uchar net[IPaddrlen], mask[IPaddrlen];
|
||||
Area *s;
|
||||
|
@ -1057,7 +1057,7 @@ createv4ptrs(void)
|
|||
net[IPv4off+1] = atoi(f[2]);
|
||||
net[IPv4off+2] = atoi(f[1]);
|
||||
net[IPv4off+3] = atoi(f[0]);
|
||||
sprint(ipa, "%I", net);
|
||||
snprint(ipa, sizeof(ipa), "%I", net);
|
||||
t = ndbipinfo(db, "ip", ipa, attribs, 1);
|
||||
if(t == nil) /* could be a reverse with no forward */
|
||||
continue;
|
||||
|
@ -1066,7 +1066,7 @@ createv4ptrs(void)
|
|||
ndbfree(t);
|
||||
continue;
|
||||
}
|
||||
parseipmask(mask, nt->val);
|
||||
parseipmask(mask, nt->val, 1);
|
||||
ndbfree(t);
|
||||
n = 5;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue