Skip to content

Commit 7a24b5e

Browse files
committed
[runtime] Fix -Wstringop-overread
1 parent b31b082 commit 7a24b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/executor/method_meta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ bool MethodMeta::uses_backend(const char* backend_name) const {
232232
const auto delegates = s_plan_->delegates();
233233
for (size_t i = 0; i < delegates->size(); i++) {
234234
auto delegate = delegates->Get(i);
235-
if (strcmp(delegate->id()->c_str(), backend_name) == 0) {
235+
if (strncmp(delegate->id()->c_str(), backend_name, delegate->id()->size()) == 0) {
236236
return true;
237237
}
238238
}

0 commit comments

Comments
 (0)