92c081e
diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
92c081e
--- tftp-hpa-0.49.orig/tftp/tftp.c	2008-10-20 18:08:31.000000000 -0400
92c081e
+++ tftp-hpa-0.49/tftp/tftp.c	2009-08-05 09:47:18.072585848 -0400
92c081e
@@ -279,15 +279,16 @@
92c081e
             struct tftphdr *tp, const char *mode)
92c081e
 {
92c081e
     char *cp;
92c081e
+    size_t len;
92c081e
 
92c081e
     tp->th_opcode = htons((u_short) request);
92c081e
     cp = (char *)&(tp->th_stuff);
92c081e
-    strcpy(cp, name);
92c081e
-    cp += strlen(name);
92c081e
-    *cp++ = '\0';
92c081e
-    strcpy(cp, mode);
92c081e
-    cp += strlen(mode);
92c081e
-    *cp++ = '\0';
92c081e
+    len = strlen(name) + 1;
92c081e
+    memcpy(cp, name, len);
92c081e
+    cp += len;
92c081e
+    len = strlen(mode) + 1;
92c081e
+    memcpy(cp, mode, len);
92c081e
+    cp += len;
92c081e
     return (cp - (char *)tp);
92c081e
 }
92c081e