Skip to content

Commit afd2d9d

Browse files
Huilin Chenfacebook-github-bot
authored andcommitted
Fixing aegis test failure in //mode/opt
Summary: Fixing [aegis test failure](https://www.internalfb.com/omh/view/secure_pipes/tests) in //mode/opt Reviewed By: mingtaoy Differential Revision: D47417779 fbshipit-source-id: 798de04256593010a2e8b6efc3575e5f54df12ea
1 parent cdfe0b8 commit afd2d9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fizz/crypto/aead/AEGISCipher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,14 @@ folly::Optional<std::unique_ptr<folly::IOBuf>> AEGISCipher::tryDecrypt(
325325
// Set up the tag buffer now
326326
const auto& lastBuf = ciphertext->prev();
327327
folly::MutableByteRange tagOut;
328+
std::array<uint8_t, kTagLength> tag;
328329
if (lastBuf->length() >= tagLength_) {
329330
// We can directly carve out this buffer from the last IOBuf
330331
// Adjust buffer sizes
331332
lastBuf->trimEnd(tagLength_);
332333

333334
tagOut = {lastBuf->writableTail(), tagLength_};
334335
} else {
335-
std::array<uint8_t, kTagLength> tag;
336336
// buffer to copy the tag into when we decrypt
337337
tagOut = {tag.data(), tagLength_};
338338
trimBytes(*ciphertext, tagOut);

0 commit comments

Comments
 (0)