opsi/net-ftp/opsi-atftp/files/atftp-0.7-pcre.patch
Mario Fetka bcd011e30a Cleanup
2013-04-17 08:48:39 +02:00

15 lines
661 B
Diff

--- atftp-0.7/tftpd_pcre.c~ 2005-10-17 23:14:52.000000000 +0200
+++ atftp-0.7/tftpd_pcre.c 2005-10-17 23:14:52.000000000 +0200
@@ -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;