vtysh: fix oversight in vtysh buffer rewrite

end can be NULL and shouldn't be adjusted in that case.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2016-10-19 14:38:48 +02:00 committed by Donald Sharp
parent 41246cb614
commit 2d35a720b9

View File

@ -185,6 +185,7 @@ vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp)
memmove (buf, eol, bufvalid - eol);
bufvalid -= eol - buf;
if (end)
end -= eol - buf;
}