Skip to content

Commit

Permalink
Coverity: Fix for CID-1550441 (#11867)
Browse files Browse the repository at this point in the history
Overflowed constant.
  • Loading branch information
brbzull0 authored Nov 18, 2024
1 parent 4b9d938 commit 32c2f8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iocore/net/SNIActionPerformer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ TunnelDestination::replace_match_groups(std::string_view dst, const ActionItem::
real_dst += *c;
continue;
}
const std::size_t group_index = swoc::svtoi(number_str);
if ((group_index - 1) < groups.size()) {
const int group_index = swoc::svtoi(number_str);
if ((group_index - 1) < static_cast<int>(groups.size())) {
// place the captured group.
real_dst += groups[group_index - 1];
if (is_writing_port) {
Expand Down

0 comments on commit 32c2f8e

Please sign in to comment.