Overflow in here should be only a theoretical possibility, but making even
such impossible cannot be a bad thing.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
//printf ("lookup: %s\n", strlongip (ctl, ip));
- sprintf (buf, "%s\n", strlongip (ctl, ip));
+ snprintf (buf, sizeof(buf), "%s\n", strlongip (ctl, ip));
rv = write (todns[1], buf, strlen (buf));
if (rv < 0)
error (0, errno, "couldn't write to resolver process");