diff options
author | brian <brian@cvs.openbsd.org> | 1999-05-27 16:52:49 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1999-05-27 16:52:49 +0000 |
commit | 76604a3fead686a57d50da5d07aeb2d481c308f8 (patch) | |
tree | 9fd5b648fdb13ae9ae383059f3938c539322b821 | |
parent | be2ae5d69b12e4f41bb6a8a69b3bf3337a19c9c9 (diff) |
Handle unterminated quoted strings without dup'ing the last character
with an out-by-one-memcpy.
-rw-r--r-- | usr.sbin/ppp/ppp/defs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ppp/ppp/defs.c b/usr.sbin/ppp/ppp/defs.c index 9dbd5069edf..835d20c9e9e 100644 --- a/usr.sbin/ppp/ppp/defs.c +++ b/usr.sbin/ppp/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.5 1999/05/08 11:06:35 brian Exp $ + * $Id: defs.c,v 1.6 1999/05/27 16:52:48 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; |