messaging_service: Fix read_serializable()
The "v" parameter points to uninitialized object in RPC deserializer, but db::serializer<>::read() variant with output parameter assumes it is initialized. Spotted by Gleb. Should fix #21.
This commit is contained in:
committed by
Avi Kivity
parent
3d3da0ceb0
commit
c304b83e8d
@@ -141,7 +141,7 @@ struct serializer {
|
||||
}
|
||||
bytes_view bv(reinterpret_cast<const int8_t*>(buf.get()), sz);
|
||||
data_input in(bv);
|
||||
db::serializer<Serializable>::read(v, in);
|
||||
new (&v) Serializable(db::serializer<Serializable>::read(in));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user