Skip to content

Commit

Permalink
[DiagnosticLogs] When the size of the TransferFileDesignator is 0, th… (
Browse files Browse the repository at this point in the history
#32213)

Co-authored-by: Vivien Nicolas <[email protected]>
  • Loading branch information
woody-apple and vivien-apple authored Feb 19, 2024
1 parent c1e12f3 commit b818745
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void DiagnosticLogsServer::HandleLogRequestForBdx(CommandHandler * commandObj, c
// INVALID_COMMAND.
VerifyOrReturn(transferFileDesignator.HasValue(), commandObj->AddStatus(path, Status::InvalidCommand));

VerifyOrReturn(transferFileDesignator.Value().size() > 0, commandObj->AddStatus(path, Status::ConstraintError));

VerifyOrReturn(transferFileDesignator.Value().size() <= kMaxFileDesignatorLen,
commandObj->AddStatus(path, Status::ConstraintError));

Expand Down

0 comments on commit b818745

Please sign in to comment.