"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "backends/dbus-vmstate.c" between
qemu-6.0.0-rc1.tar.xz and qemu-6.0.0-rc2.tar.xz

About: QEMU is a generic machine/processor emulator and virtualizer. Release candidate.

dbus-vmstate.c  (qemu-6.0.0-rc1.tar.xz):dbus-vmstate.c  (qemu-6.0.0-rc2.tar.xz)
skipping to change at line 205 skipping to change at line 205
proxies = dbus_get_proxies(self, &err); proxies = dbus_get_proxies(self, &err);
if (!proxies) { if (!proxies) {
error_report("%s: Failed to get proxies: %s", __func__, err->message); error_report("%s: Failed to get proxies: %s", __func__, err->message);
return -1; return -1;
} }
m = g_memory_input_stream_new_from_data(self->data, self->data_size, NULL); m = g_memory_input_stream_new_from_data(self->data, self->data_size, NULL);
s = g_data_input_stream_new(m); s = g_data_input_stream_new(m);
g_data_input_stream_set_byte_order(s, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN); g_data_input_stream_set_byte_order(s, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN);
g_buffered_input_stream_set_buffer_size(G_BUFFERED_INPUT_STREAM(s),
DBUS_VMSTATE_SIZE_LIMIT);
nelem = g_data_input_stream_read_uint32(s, NULL, &err); nelem = g_data_input_stream_read_uint32(s, NULL, &err);
if (err) { if (err) {
goto error; goto error;
} }
while (nelem > 0) { while (nelem > 0) {
GDBusProxy *proxy = NULL; GDBusProxy *proxy = NULL;
uint32_t len; uint32_t len;
gsize bytes_read, avail; gsize bytes_read, avail;
skipping to change at line 245 skipping to change at line 247
trace_dbus_vmstate_loading(id); trace_dbus_vmstate_loading(id);
proxy = g_hash_table_lookup(proxies, id); proxy = g_hash_table_lookup(proxies, id);
if (!proxy) { if (!proxy) {
error_report("%s: Failed to find proxy Id '%s'", __func__, id); error_report("%s: Failed to find proxy Id '%s'", __func__, id);
return -1; return -1;
} }
len = g_data_input_stream_read_uint32(s, NULL, &err); len = g_data_input_stream_read_uint32(s, NULL, &err);
if (len > DBUS_VMSTATE_SIZE_LIMIT) {
error_report("%s: Invalid vmstate size: %u", __func__, len);
return -1;
}
g_buffered_input_stream_fill(G_BUFFERED_INPUT_STREAM(s), len, NULL,
&err);
if (err) {
goto error;
}
avail = g_buffered_input_stream_get_available( avail = g_buffered_input_stream_get_available(
G_BUFFERED_INPUT_STREAM(s)); G_BUFFERED_INPUT_STREAM(s));
if (len > avail) {
if (len > DBUS_VMSTATE_SIZE_LIMIT || len > avail) { error_report("%s: Not enough data available to load for Id: '%s'. "
error_report("%s: Invalid vmstate size: %u", __func__, len); "Available data size: %zu, Actual vmstate size: %u",
__func__, id, avail, len);
return -1; return -1;
} }
if (dbus_load_state_proxy(proxy, if (dbus_load_state_proxy(proxy,
g_buffered_input_stream_peek_buffer(G_BUFFERED_INPUT_STREAM(s), g_buffered_input_stream_peek_buffer(G_BUFFERED_INPUT_STREAM(s),
NULL), NULL),
len) < 0) { len) < 0) {
error_report("%s: Failed to restore Id '%s'", __func__, id); error_report("%s: Failed to restore Id '%s'", __func__, id);
return -1; return -1;
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)