Skip to content

Commit 8305572

Browse files
Fix overflow memset in JGINYUEInternalV2Controller.cpp
1 parent 9ced0a9 commit 8305572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Controllers/JGINYUEInternalUSBV2Controller/JGINYUEInternalUSBV2Controller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ void JGINYUEInternalUSBV2Controller::Init_device()
9797
if(usb_buf[1] != 0x0F)
9898
{
9999
ZoneCount = 0x00;
100-
memset(device_config, 0x00, 8*sizeof(AreaConfigurationV2));
101-
memset (&device_config_Global, 0x00, 8*sizeof(AreaConfigurationV2));
100+
memset(device_config, 0x00, sizeof(device_config));
101+
memset (&device_config_Global, 0x00, sizeof(device_config_Global));
102102
return;
103103
}
104104
unsigned char Zone_Info = usb_buf[4];

0 commit comments

Comments
 (0)