Project

General

Profile

Bug #3004

sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c:808: suspicious size ?

Added by dcb 7 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/31/2017
Due date:
% Done:

0%


Description

sys/netgraph7/bluetooth/socket/ng_btsocket_hci_raw.c:808]: (warning) Division by result of sizeof(). memset() expects a size in bytes, did you intend to multiply instead?

Source code is

memset(&ng_btsocket_hci_raw_sec_filter->events, 0xff,
sizeof(ng_btsocket_hci_raw_sec_filter->events)/
sizeof(ng_btsocket_hci_raw_sec_filter->events[0]));

maybe better code

memset(&ng_btsocket_hci_raw_sec_filter->events, 0xff,
sizeof(ng_btsocket_hci_raw_sec_filter->events));

History

#1 Updated by dillon 6 months ago

  • Status changed from New to Closed

Fix committed by Matt

Also available in: Atom PDF