diff options
| author | Stefan Boberg <[email protected]> | 2021-09-13 16:57:19 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-13 16:57:19 +0200 |
| commit | 0018d8b4e4e9e8524bf8ed2ac5b61ef987b852a9 (patch) | |
| tree | 591c874f09acd321a1bbf04f12c357dc628a7d91 | |
| parent | Changed interface for httpServerRequest::SessionId()/RequestId() so they shar... (diff) | |
| download | zen-0018d8b4e4e9e8524bf8ed2ac5b61ef987b852a9.tar.xz zen-0018d8b4e4e9e8524bf8ed2ac5b61ef987b852a9.zip | |
Enforce sizes of package serialization structures
| -rw-r--r-- | zenhttp/httpshared.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/zenhttp/httpshared.h b/zenhttp/httpshared.h index dbbebb348..fbf35076b 100644 --- a/zenhttp/httpshared.h +++ b/zenhttp/httpshared.h @@ -17,6 +17,8 @@ struct CbPackageHeader uint32_t Reserved2; }; +static_assert(sizeof(CbPackageHeader) == 16); + static constinit uint32_t kCbPkgMagic = 0xaa77aacc; struct CbAttachmentEntry @@ -26,6 +28,8 @@ struct CbAttachmentEntry IoHash AttachmentHash; }; +static_assert(sizeof(CbAttachmentEntry) == 32); + std::vector<IoBuffer> FormatPackageMessage(const CbPackage& Data); CbPackage ParsePackageMessage(IoBuffer Payload); |