Skip to content

Commit 0a00ce9

Browse files
hanbinyooncopybara-github
authored andcommitted
Fix tfrt.case: Prevent out-of-bounds access to a vector.
PiperOrigin-RevId: 444573692
1 parent 21f36ae commit 0a00ce9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/basic_kernels/control_flow_kernels.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static void TFRTCase(RemainingArguments args, RemainingResults results,
7474
" # branches: ", branches.size()),
7575
tfrt::ErrorCode::kInvalidArgument);
7676
for (auto& result : results) result = error;
77+
return;
7778
}
7879
branches[branch_index]->Execute(exec_ctx, args.drop_front(), results);
7980
};

0 commit comments

Comments
 (0)