mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 23:49:04 +00:00
server: break read_from_vdi_port loop if the guest gets disconnected
read_from_vdi_port calls dispatch_vdi_port data, which will disconnect the guest agent if it sends invalid data. It would then try to read more data from the disconnected guest agent resulting in a NULL ptr dereference, this patch fixes this.
This commit is contained in:
parent
7cc85f33be
commit
a19f51265c
@ -1292,7 +1292,7 @@ static int read_from_vdi_port(void)
|
||||
}
|
||||
|
||||
sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceCharDeviceInterface, base);
|
||||
while (!quit_loop) {
|
||||
while (!quit_loop && vdagent) {
|
||||
switch (state->read_state) {
|
||||
case VDI_PORT_READ_STATE_READ_HADER:
|
||||
n = sif->read(vdagent, state->recive_pos, state->recive_len);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user