Skip to content

Commit

Permalink
fix: writing over the buffer limit
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaDucak committed Jun 7, 2024
1 parent 8a1e1e0 commit 467409f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/utils/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::string decrypt(const std::string &password, std::istream &file) {
}

std::array<unsigned char, kBufferSize + EVP_MAX_BLOCK_LENGTH> inBuffer{};
std::array<unsigned char, kBufferSize> outBuffer{};
std::array<unsigned char, kBufferSize + EVP_MAX_BLOCK_LENGTH> outBuffer{};
int bytesRead = 0;
int outLength = 0;
std::string output;
Expand Down

0 comments on commit 467409f

Please sign in to comment.