summaryrefslogtreecommitdiff
path: root/net-ftp/atftp/files/atftp-0.7-illreply.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-ftp/atftp/files/atftp-0.7-illreply.patch')
-rw-r--r--net-ftp/atftp/files/atftp-0.7-illreply.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/net-ftp/atftp/files/atftp-0.7-illreply.patch b/net-ftp/atftp/files/atftp-0.7-illreply.patch
new file mode 100644
index 000000000000..0f1cacd9b955
--- /dev/null
+++ b/net-ftp/atftp/files/atftp-0.7-illreply.patch
@@ -0,0 +1,12 @@
+*** atftp-0.7/tftp_def.old.c 2009-02-28 17:56:12.000000000 +0100
+--- atftp-0.7/tftp_def.c 2009-02-28 17:57:02.000000000 +0100
+***************
+*** 141,146 ****
+--- 141,147 ----
+ */
+ inline char *Strncpy(char *to, const char *from, size_t size)
+ {
++ if (size <= 0) { *to = '\000'; return to; }
+ to[size-1] = '\000';
+ return strncpy(to, from, size - 1);
+ }