Skip to content
Commit ca749b2a authored by Daniel Mack's avatar Daniel Mack Committed by Felipe Balbi
Browse files

usb: musb: dsps: fix res_name length



The res_name is used for the name construction of a DT property as
follows:

  sprintf(res_name, "port%d-mode", id);

Hence, res_name must be at least 11 characters long in order to store
the name including the terminating '\0'.

While at it, use to snprintf() rather than sprintf() when accessing this
buffer.

Reported-by: default avatarDavid Binderman <dcb314@hotmail.com>
Signed-off-by: default avatarDaniel Mack <zonque@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6f0c0580
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment