--- tftpd/src/srv.c 2014/02/24 15:23:39 1.7 +++ tftpd/src/srv.c 2014/02/24 21:55:35 1.7.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.7 2014/02/24 15:23:39 misho Exp $ +* $Id: srv.c,v 1.7.2.1 2014/02/24 21:55:35 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -285,6 +285,10 @@ RQ(sched_task_t *task) cli.siz = TFTP_LOAD_MAX; cli.opc = ntohs(rpack_uint16(pkt, NULL, 0)); + if (!RW && cli.opc == TFTP_OPC_WRQ) { + code = 2; + goto end; + } len = str_getString(RPACK_NEXT(pkt), rlen, &str); if (len == -1) goto end;