Skip to content

Commit

Permalink
messaging_service: Fix read_serializable()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tgrabiec authored and avikivity committed Jul 16, 2015
1 parent 3d3da0c commit c304b83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion message/messaging_service.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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));
});
});
}
Expand Down

0 comments on commit c304b83

Please sign in to comment.