aboutsummaryrefslogtreecommitdiff
path: root/ftp/atftp/files/patch-tftpd_pcre.c
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/atftp/files/patch-tftpd_pcre.c')
-rw-r--r--ftp/atftp/files/patch-tftpd_pcre.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ftp/atftp/files/patch-tftpd_pcre.c b/ftp/atftp/files/patch-tftpd_pcre.c
new file mode 100644
index 000000000000..e50626e7cb1c
--- /dev/null
+++ b/ftp/atftp/files/patch-tftpd_pcre.c
@@ -0,0 +1,14 @@
+--- tftpd_pcre.c.orig 2010-10-04 18:24:43.000000000 +0800
++++ tftpd_pcre.c 2010-10-04 18:25:23.000000000 +0800
+@@ -211,9 +211,9 @@
+ chp++; /* point to value indicating substring */
+ rc = pcre_get_substring(str, ovector, matches, *chp - 0x30, &tmpstr);
+ /* found string */
+- if (rc > 0)
++ if (rc > 0 && outchp - outstr + rc+1 < outsize)
+ {
+- Strncpy(outchp, tmpstr, rc);
++ Strncpy(outchp, tmpstr, rc+1);
+ outchp += rc;
+ pcre_free_substring(tmpstr);
+ continue;