arduino / arduino/ArduinoCore-avr

PluggableUSB iSerialNum buffer overflow

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

`PluggableUSB_::getShortName` and `PluggableUSBModule::getShortName` should not only get a char pointer as argument, but also the size of the buffer. I have currently the problem that i don't know how many chars I can copy to the pointer, without producing a overflow. So if other `PluggableUSBModule`'s appended some characters, I have less space for my string. But currently I can't know that, because the remaining size of the buffer is not given.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating PluggableUSB_::getShortName and PluggableUSBModule::getShortName and trace how their character buffers are assembled. Check the callers and any existing USB descriptor-related tests or examples. Done means the available buffer size is known at each call and appended strings cannot overflow it.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.