diff options
-rw-r--r-- | backends/dbus-vmstate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/dbus-vmstate.c b/backends/dbus-vmstate.c index bd050e8e9c..2a0d2e4a31 100644 --- a/backends/dbus-vmstate.c +++ b/backends/dbus-vmstate.c @@ -229,7 +229,10 @@ static int dbus_vmstate_post_load(void *opaque, int version_id) &bytes_read, NULL, &err)) { goto error; } - g_return_val_if_fail(bytes_read == len, -1); + if (bytes_read != len) { + error_report("%s: Short read", __func__); + return -1; + } id[len] = 0; trace_dbus_vmstate_loading(id); |