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 @@ -4159,6 +4159,9 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
41594159 struct inquiry_info_with_rssi_and_pscan_mode * info ;
41604160 info = (void * ) (skb -> data + 1 );
41614161
4162+ if (skb -> len < num_rsp * sizeof (* info ) + 1 )
4163+ goto unlock ;
4164+
41624165 for (; num_rsp ; num_rsp -- , info ++ ) {
41634166 u32 flags ;
41644167
@@ -4180,6 +4183,9 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
41804183 } else {
41814184 struct inquiry_info_with_rssi * info = (void * ) (skb -> data + 1 );
41824185
4186+ if (skb -> len < num_rsp * sizeof (* info ) + 1 )
4187+ goto unlock ;
4188+
41834189 for (; num_rsp ; num_rsp -- , info ++ ) {
41844190 u32 flags ;
41854191
@@ -4200,6 +4206,7 @@ static void hci_inquiry_result_with_rssi_evt(struct hci_dev *hdev,
42004206 }
42014207 }
42024208
4209+ unlock :
42034210 hci_dev_unlock (hdev );
42044211}
42054212
You can’t perform that action at this time.
0 commit comments