Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ac80d9

Browse filesBrowse files
gdsportscmaglie
gdsports
authored andcommitted
Fix memory overwrite in USBHost
Fix issue #271.
1 parent 3b38a41 commit 9ac80d9
Copy full SHA for 9ac80d9

File tree

1 file changed

+1
-4
lines changed
Filter options

1 file changed

+1
-4
lines changed

‎cores/arduino/USB/samd21_host.c

Copy file name to clipboardExpand all lines: cores/arduino/USB/samd21_host.c
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,7 @@ void UHD_Init(void)
147147
USB->HOST.DESCADD.reg = (uint32_t)(&usb_pipe_table[0]);
148148
// For USB_SPEED_FULL
149149
uhd_force_full_speed();
150-
for (i = 0; i < sizeof(usb_pipe_table); i++)
151-
{
152-
(*(uint32_t *)(&usb_pipe_table[0] + i)) = 0;
153-
}
150+
memset((void *)usb_pipe_table, 0, sizeof(usb_pipe_table));
154151

155152
uhd_state = UHD_STATE_NO_VBUS;
156153

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.