mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-08 08:41:48 +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
c652dfa5e6
commit
d590666408
@ -883,7 +883,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