Mir

Code review comment for lp:~mir-team/mir/handle-mis-shaped-cookies

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Let me try paraphrasing the case for this MP to see if I've got it:

1. mir::cookie::Blob isn't part of the mircookie, it is a temporary convenience for the event serialization code. (OTOH mir::cookie::default_blob_size from the same private header is used in mircookie.)

2. We don't provide a conversion (ctor, function, etc.) between std::vector<uint8_t> and mir::cookie::Blob but instead repeat the logic wherever we need this conversion.

3. The crash happens because this temporary convenience makes assumptions about serialized cookies that are invalidated by USC's replacement for CookieAuthority.

But...

4. This is a temporary mess to be cleaned up as part of a rework of the aforementioned event serialization code.

~~~~

If I've got that right, isn't a simpler solution to have USC's replacement for Cookie::serialize() return a dummy vector of the expected size?

review: Needs Information

« Back to merge proposal