Commit 34c35bea authored by Kees Cook's avatar Kees Cook Committed by Jiri Slaby

usb: gadget: tcm_usb_gadget: stop format strings

commit aba37fd9 upstream.

This makes sure that the name coming out of configfs cannot be used
accidentally as a format string.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 8e7f2dc6
......@@ -1613,7 +1613,7 @@ static struct se_wwn *usbg_make_tport(
return ERR_PTR(-ENOMEM);
}
tport->tport_wwpn = wwpn;
snprintf(tport->tport_name, sizeof(tport->tport_name), wnn_name);
snprintf(tport->tport_name, sizeof(tport->tport_name), "%s", wnn_name);
return &tport->tport_wwn;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment