mirror of https://github.com/ARMmbed/mbed-os.git
The two following memcpy() calls in USBEndpoint::init() are passing in
a NULL pointer as the copy source location.
memcpy(td_list_[0], 0, sizeof(HCTD));
memcpy(td_list_[1], 0, sizeof(HCTD));
I suspect that these were meant to be memset() calls instead so I
switched them. In one of the places that I found where this method is
called, USBHost::newEndpoint(), its passes in an array of HCTD objects
which have already been cleared with similar memset() calls. I am
therefore pretty certain that these were meant to be memset() calls but
if all callers already guarantee that they are zeroed out then maybe
the memset()s can be removed from USBEndpoint::init() anyway.
|
||
|---|---|---|
| .. | ||
| USBDevice | ||
| USBHost | ||
| doc | ||
| dsp | ||
| fs | ||
| mbed | ||
| net | ||
| rpc | ||
| rtos | ||
| tests | ||