From: J. Bruce Fields Date: Tue, 6 Aug 2019 10:57:50 +0000 (-0400) Subject: thunderbolt: Show key using %*pE not %*pEp X-Git-Tag: v5.4-rc1~133^2~47^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04f7745300edbb3fbb9447586b0aafeef28abd51;p=thirdparty%2Fkernel%2Flinux.git thunderbolt: Show key using %*pE not %*pEp %*pEp (without "h" or "o") is a no-op. This string could contain arbitrary (non-NULL) characters, so we do want escaping. Use %*pE like every other caller. Signed-off-by: J. Bruce Fields Signed-off-by: Mika Westerberg --- diff --git a/drivers/thunderbolt/xdomain.c b/drivers/thunderbolt/xdomain.c index 5118d46702d52..4e17a7c7bf0ae 100644 --- a/drivers/thunderbolt/xdomain.c +++ b/drivers/thunderbolt/xdomain.c @@ -636,7 +636,7 @@ static ssize_t key_show(struct device *dev, struct device_attribute *attr, * It should be null terminated but anything else is pretty much * allowed. */ - return sprintf(buf, "%*pEp\n", (int)strlen(svc->key), svc->key); + return sprintf(buf, "%*pE\n", (int)strlen(svc->key), svc->key); } static DEVICE_ATTR_RO(key);