mirror of
https://git.freebsd.org/ports.git
synced 2025-07-07 20:39:18 -04:00
Atftp is a client/server implementation of the TFTP protocol that implements RFCs 1350, 2090, 2347, 2348, and 2349. The server is multi-threaded and the client presents a friendly interface using libreadline. The current server implementation lacks IPv6 support.
14 lines
645 B
C
14 lines
645 B
C
--- 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;
|