mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 02:17:39 +00:00
Fixed crash if trying to dump a packet larger than USB_PACKET_LENGTH
This commit is contained in:
parent
2bf6a7c6af
commit
b252ecec6d
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ void HIDAPI_DumpPacket(const char *prefix, const Uint8 *data, int size)
|
|||
{
|
||||
int i;
|
||||
char *buffer;
|
||||
size_t length = SDL_strlen(prefix) + 11 * (USB_PACKET_LENGTH / 8) + (5 * USB_PACKET_LENGTH * 2) + 1 + 1;
|
||||
size_t length = SDL_strlen(prefix) + 11 * (size / 8) + (5 * size * 2) + 1 + 1;
|
||||
int start = 0, amount = size;
|
||||
size_t current_len;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue