mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 06:41:26 +00:00
Remove obsd warnings
This commit is contained in:
parent
9bb84fe05d
commit
b156b7a9e1
6
dns.c
6
dns.c
|
@ -263,7 +263,7 @@ dns_write(int fd, int id, char *buf, int len)
|
|||
int i;
|
||||
int parts;
|
||||
int p;
|
||||
char data[256];
|
||||
char data[257];
|
||||
char *d;
|
||||
|
||||
#define CHUNK 31
|
||||
|
@ -289,11 +289,11 @@ dns_write(int fd, int id, char *buf, int len)
|
|||
}
|
||||
parts = avail % CHUNK;
|
||||
for (i = 0; i < parts; i++) {
|
||||
sprintf(d, "%02X", buf[p*CHUNK + i]);
|
||||
snprintf(d, 3, "%02X", buf[p*CHUNK + i]);
|
||||
d += 2;
|
||||
}
|
||||
*d++ = '.';
|
||||
strcpy(d, topdomain);
|
||||
strncpy(d, topdomain, strlen(topdomain)+1);
|
||||
|
||||
printf("Resolving %s\n", data);
|
||||
dns_query(fd, id, data, T_A);
|
||||
|
|
Loading…
Reference in a new issue