Skip to content

Commit 9e79452

Browse files
committed
[runtime] Fix -Wstringop-overread
1 parent 5f031d4 commit 9e79452

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
@@ -233,7 +233,7 @@ bool MethodMeta::uses_backend(const char* backend_name) const {
233233
const auto delegates = s_plan_->delegates();
234234
for (size_t i = 0; i < delegates->size(); i++) {
235235
auto delegate = delegates->Get(i);
236-
if (std::strcmp(delegate->id()->c_str(), backend_name) == 0) {
236+
if (strncmp(delegate->id()->c_str(), backend_name, delegate->id()->size()) == 0) {
237237
return true;
238238
}
239239
}

0 commit comments

Comments
 (0)