Skip to content

Commit

Permalink
santa-driver: fix off-by-one bug in externalMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed Apr 7, 2020
1 parent 854a7c2 commit 4e405be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/santa_driver/SantaDriverClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ IOReturn SantaDriverClient::externalMethod(
{ &SantaDriverClient::filemod_prefix_filter_reset, 0, 0, 0, 0 },
};

if (selector > static_cast<UInt32>(kSantaUserClientNMethods)) {
if (selector >= static_cast<UInt32>(kSantaUserClientNMethods)) {
return kIOReturnBadArgument;
}

Expand Down

0 comments on commit 4e405be

Please sign in to comment.