[Midnightbsd-cvs] src [8706] trunk/libexec/tftpd/tftp-io.c: fix buffer size

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 18:17:51 EDT 2016


Revision: 8706
          http://svnweb.midnightbsd.org/src/?rev=8706
Author:   laffer1
Date:     2016-09-25 18:17:51 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
fix buffer size

Modified Paths:
--------------
    trunk/libexec/tftpd/tftp-io.c

Modified: trunk/libexec/tftpd/tftp-io.c
===================================================================
--- trunk/libexec/tftpd/tftp-io.c	2016-09-25 22:17:33 UTC (rev 8705)
+++ trunk/libexec/tftpd/tftp-io.c	2016-09-25 22:17:51 UTC (rev 8706)
@@ -87,7 +87,6 @@
 {
 	static char ebuf[40];
 	struct errmsg *pe;
-	char buf[MAXPKTSIZE];
 
 	if (error == 0)
 		return ("success");
@@ -94,7 +93,7 @@
 	for (pe = errmsgs; pe->e_code >= 0; pe++)
 		if (pe->e_code == error)
 			return (pe->e_msg);
-	snprintf(ebuf, sizeof(buf), "error %d", error);
+	snprintf(ebuf, sizeof(ebuf), "error %d", error);
 	return (ebuf);
 }
 



More information about the Midnightbsd-cvs mailing list