mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-26 15:06:04 +03: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 i;
|
||||||
int parts;
|
int parts;
|
||||||
int p;
|
int p;
|
||||||
char data[256];
|
char data[257];
|
||||||
char *d;
|
char *d;
|
||||||
|
|
||||||
#define CHUNK 31
|
#define CHUNK 31
|
||||||
@ -289,11 +289,11 @@ dns_write(int fd, int id, char *buf, int len)
|
|||||||
}
|
}
|
||||||
parts = avail % CHUNK;
|
parts = avail % CHUNK;
|
||||||
for (i = 0; i < parts; i++) {
|
for (i = 0; i < parts; i++) {
|
||||||
sprintf(d, "%02X", buf[p*CHUNK + i]);
|
snprintf(d, 3, "%02X", buf[p*CHUNK + i]);
|
||||||
d += 2;
|
d += 2;
|
||||||
}
|
}
|
||||||
*d++ = '.';
|
*d++ = '.';
|
||||||
strcpy(d, topdomain);
|
strncpy(d, topdomain, strlen(topdomain)+1);
|
||||||
|
|
||||||
printf("Resolving %s\n", data);
|
printf("Resolving %s\n", data);
|
||||||
dns_query(fd, id, data, T_A);
|
dns_query(fd, id, data, T_A);
|
||||||
|
Loading…
Reference in New Issue
Block a user