Skip to content

Commit

Permalink
add null check to SetSearchKeySingle in nn_olv_PostTypes.h
Browse files Browse the repository at this point in the history
Added null check for searchKey in SetSearchKeySingle function to prevent exceptions when data is unavailable or incorrect.
  • Loading branch information
Squall-Leonhart committed Sep 21, 2023
1 parent b4aa10b commit d5cf0f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Cafe/OS/libs/nn_olv/nn_olv_PostTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ namespace nn
// SetSearchKey__Q3_2nn3olv25DownloadPostDataListParamFPCw
static nnResult SetSearchKeySingle(DownloadPostDataListParam* _this, const uint16be* searchKey)
{
if (searchKey == NULL)
{
return OLV_RESULT_INVALID_PARAMETER;
}
return SetSearchKey(_this, searchKey, 0);
}

Expand Down

0 comments on commit d5cf0f3

Please sign in to comment.