diff options
author | brian <brian@FreeBSD.org> | 1999-05-27 16:51:47 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-05-27 16:51:47 +0000 |
commit | e76602ae08a5cde53762f6ab2c343135d532f9a8 (patch) | |
tree | f6386061023cbd2c5958c4bf9f7c06000ea3602d /usr.sbin/ppp/defs.c | |
parent | af51bc8eb221a56b5cf9a5dd8c776d6de9d0d903 (diff) | |
download | FreeBSD-src-e76602ae08a5cde53762f6ab2c343135d532f9a8.zip FreeBSD-src-e76602ae08a5cde53762f6ab2c343135d532f9a8.tar.gz |
Handle unterminated quoted strings without dup'ing the last character
with an out-by-one-memcpy.
Diffstat (limited to 'usr.sbin/ppp/defs.c')
-rw-r--r-- | usr.sbin/ppp/defs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index 0081ee4..b02f8f2 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: defs.c,v 1.19 1999/04/26 08:54:24 brian Exp $ + * $Id: defs.c,v 1.20 1999/05/08 11:06:26 brian Exp $ */ @@ -268,7 +268,7 @@ findblank(char *p, int instring) if (instring) { while (*p) { if (*p == '\\') { - memmove(p, p + 1, strlen(p + 1)); + memmove(p, p + 1, strlen(p)); if (!*p) break; } else if (*p == '"') @@ -301,7 +301,7 @@ MakeArgs(char *script, char **pvect, int maxargs) instring = 1; script++; if (*script == '\0') - break; /* Shouldn't return here. Need to null + break; /* Shouldn't return here. Need to NULL * terminate below */ } else instring = 0; |