File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3623,6 +3623,9 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
3623
3623
struct inquiry_info_with_rssi_and_pscan_mode * info ;
3624
3624
info = (void * ) (skb -> data + 1 );
3625
3625
3626
+ if (skb -> len < num_rsp * sizeof (* info ) + 1 )
3627
+ goto unlock ;
3628
+
3626
3629
for (; num_rsp ; num_rsp -- , info ++ ) {
3627
3630
u32 flags ;
3628
3631
@@ -3644,6 +3647,9 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
3644
3647
} else {
3645
3648
struct inquiry_info_with_rssi * info = (void * ) (skb -> data + 1 );
3646
3649
3650
+ if (skb -> len < num_rsp * sizeof (* info ) + 1 )
3651
+ goto unlock ;
3652
+
3647
3653
for (; num_rsp ; num_rsp -- , info ++ ) {
3648
3654
u32 flags ;
3649
3655
@@ -3664,6 +3670,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
3664
3670
}
3665
3671
}
3666
3672
3673
+ unlock :
3667
3674
hci_dev_unlock (hdev );
3668
3675
}
3669
3676
You can’t perform that action at this time.
0 commit comments