summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@openbsd.org>1999-05-27 16:52:48 +0000
committerbrian <brian@openbsd.org>1999-05-27 16:52:48 +0000
commit304dad24893ca3854bfd08505c5066c87f4f20e8 (patch)
tree22912d9ba083342d28470e5cd3f87cf0b1e64996
parentUse -O1 to work around egcs/m68k bug (diff)
downloadwireguard-openbsd-304dad24893ca3854bfd08505c5066c87f4f20e8.tar.xz
wireguard-openbsd-304dad24893ca3854bfd08505c5066c87f4f20e8.zip
Handle unterminated quoted strings without dup'ing the last character
with an out-by-one-memcpy.
-rw-r--r--usr.sbin/ppp/ppp/defs.c6
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;