mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-10-17 21:20:27 +00:00
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:
parent
41246cb614
commit
2d35a720b9
@ -185,7 +185,8 @@ vtysh_client_run (struct vtysh_client *vclient, const char *line, FILE *fp)
|
|||||||
|
|
||||||
memmove (buf, eol, bufvalid - eol);
|
memmove (buf, eol, bufvalid - eol);
|
||||||
bufvalid -= eol - buf;
|
bufvalid -= eol - buf;
|
||||||
end -= eol - buf;
|
if (end)
|
||||||
|
end -= eol - buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bufvalid == buf + bufsz)
|
if (bufvalid == buf + bufsz)
|
||||||
|
Loading…
Reference in New Issue
Block a user