Skip to content

Commit

Permalink
Printf format fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed May 1, 2014
1 parent 2af836a commit 3fc5cb1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,11 @@ rdns_generate_ptr_from_str (const char *str)
len = 4 * 4 + sizeof ("in-addr.arpa");
res = malloc (len);
if (res) {
snprintf (res, len, "%c.%c.%c.%c.in-addr.arpa",
bytes[3], bytes[2], bytes[1], bytes[0]);
snprintf (res, len, "%u.%u.%u.%u.in-addr.arpa",
(unsigned)bytes[3]&0xF,
(unsigned)bytes[2]&0xF,
(unsigned)bytes[1]&0xF,
(unsigned)bytes[0]&0xF);
}
}
else if (inet_pton (AF_INET6, str, &addr.v6) == 1) {
Expand Down

0 comments on commit 3fc5cb1

Please sign in to comment.