diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c index 364e7d2..e2659e0 100644 --- a/tftpd/tftpd.c +++ b/tftpd/tftpd.c @@ -1085,6 +1085,11 @@ int tftp(struct tftphdr *tp, int size) end = (char *)tp + size; + if (!*cp) { + nak(EBADOP, "Zero-length filename."); + exit(0); + } + while (cp < end && *cp) { do { cp++;