diff options
| -rw-r--r-- | vtysh/vtysh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index aaf3f828c4..4b579ddbdb 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -185,7 +185,8 @@ vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp) memmove (buf, eol, bufvalid - eol); bufvalid -= eol - buf; - end -= eol - buf; + if (end) + end -= eol - buf; } if (bufvalid == buf + bufsz) |
