diff options
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/pipeline.cpp b/common/pipeline.cpp index 339a39c..dda7671 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp | |||
@@ -106,15 +106,21 @@ Async::Job<void> Pipeline::newEntity(void const *command, size_t size) | |||
106 | { | 106 | { |
107 | flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size); | 107 | flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(command), size); |
108 | if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) { | 108 | if (!Akonadi2::Commands::VerifyCreateEntityBuffer(verifyer)) { |
109 | qWarning() << "invalid buffer"; | 109 | qWarning() << "invalid buffer, not a create entity buffer"; |
110 | return Async::null<void>(); | 110 | return Async::null<void>(); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | |||
114 | auto createEntity = Akonadi2::Commands::GetCreateEntity(command); | 113 | auto createEntity = Akonadi2::Commands::GetCreateEntity(command); |
115 | 114 | ||
116 | //TODO rename createEntitiy->domainType to bufferType | 115 | //TODO rename createEntitiy->domainType to bufferType |
117 | const QString entityType = QString::fromUtf8(reinterpret_cast<char const*>(createEntity->domainType()->Data()), createEntity->domainType()->size()); | 116 | const QString entityType = QString::fromUtf8(reinterpret_cast<char const*>(createEntity->domainType()->Data()), createEntity->domainType()->size()); |
117 | { | ||
118 | flatbuffers::Verifier verifyer(reinterpret_cast<const uint8_t *>(createEntity->delta()->Data()), createEntity->delta()->size()); | ||
119 | if (!Akonadi2::VerifyEntityBuffer(verifyer)) { | ||
120 | qWarning() << "invalid buffer, not an entity buffer"; | ||
121 | return Async::null<void>(); | ||
122 | } | ||
123 | } | ||
118 | auto entity = Akonadi2::GetEntity(createEntity->delta()->Data()); | 124 | auto entity = Akonadi2::GetEntity(createEntity->delta()->Data()); |
119 | 125 | ||
120 | //Add metadata buffer | 126 | //Add metadata buffer |