Skip to content

Commit

Permalink
prevent out of bounds access in automated tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Oct 16, 2024
1 parent 28122bb commit 7178aec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/syncenginetestutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ FileInfo *FakePutReply::perform(FileInfo &remoteRootFileInfo, const QNetworkRequ
fileInfo->contentChar = putPayload.at(0);
} else {
// Assume that the file is filled with the same character
fileInfo = remoteRootFileInfo.create(fileName, putPayload.size(), putPayload.at(0));
fileInfo = remoteRootFileInfo.create(fileName, putPayload.size(), putPayload.isEmpty() ? ' ' : putPayload.at(0));
}
fileInfo->lastModified = OCC::Utility::qDateTimeFromTime_t(request.rawHeader("X-OC-Mtime").toLongLong());
remoteRootFileInfo.find(fileName, /*invalidateEtags=*/true);
Expand Down

0 comments on commit 7178aec

Please sign in to comment.