| Summary: | NULL passed to memcpy in WriteProprietary in SDL_hidapi_switch.c | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Mathieu Eyraud <meyraud705> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.10 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | check for NULL | ||
Fixed, thanks! https://hg.libsdl.org/SDL/rev/9ebdd8dfc588 |
Created attachment 4193 [details] check for NULL In SDL_hidapi_switch.c line 443: Function BTrySetupUSB call WriteProprietary with pBuf=NULL and ucLen=0 line 376: WriteProprietary check its input (!pBuf && ucLen > 0) || ucLen > sizeof(packet.rgucProprietaryData): ucLen is 0 so it passes line 382: WriteProprietary call memcpy with pBuf=NULL