Skip to content

Commit

Permalink
Fix crash bug due to VLA changes
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcook committed Nov 25, 2024
1 parent f2cd687 commit ae2fd16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions trackalert/trackalert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ try
char msg[len];
readn2(fd, msg, len);

string line(msg, len);
string line;
try {
line = sodDecryptSym(line, g_key, readingNonce);
line = sodDecryptSym(msg, g_key, readingNonce);
}
catch (std::runtime_error& e) {
errlog("Could not decrypt client command: %s", e.what());
Expand Down
6 changes: 3 additions & 3 deletions wforce/wforce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@ try
string msg;
msg.resize(len);
readn2(fd, msg.data(), len);
string line(msg, len);

string line;
try {
line = sodDecryptSym(line, key, readingNonce);
line = sodDecryptSym(msg, key, readingNonce);
}
catch (std::runtime_error& e) {
errlog("Could not decrypt client command: %s", e.what());
Expand Down

0 comments on commit ae2fd16

Please sign in to comment.