Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aba37fd9 authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

usb: gadget: tcm_usb_gadget: stop format strings



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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 48968f8d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}