? tftpd ? tftpd.8.manlint Index: tftpd.c =================================================================== RCS file: /cvs/src/usr.sbin/tftpd/tftpd.c,v retrieving revision 1.22 diff -u -p -r1.22 tftpd.c --- tftpd.c 13 Aug 2014 17:41:58 -0000 1.22 +++ tftpd.c 19 Nov 2014 04:07:08 -0000 @@ -434,13 +434,16 @@ rewrite_events(void) void rewrite_map(struct tftp_client *client, const char *filename) { - char nicebuf[MAXPATHLEN]; + char *nicebuf; - (void)strnvis(nicebuf, filename, MAXPATHLEN, VIS_SAFE|VIS_OCTAL); + if (stravis(&nicebuf, filename, VIS_SAFE|VIS_OCTAL) == -1) + lerr(1, "rwmap stravis"); if (evbuffer_add_printf(rwmap->wrbuf, "%s %s %s\n", getip(&client->ss), client->opcode == WRQ ? "write" : "read", nicebuf) == -1) lerr(1, "rwmap printf"); + + free(nicebuf); TAILQ_INSERT_TAIL(&rwmap->clients, client, entry);