Re: [PATCH v6 10/19] platform/x86: hp-bioscfg: Rename local variable
From: Joe Perches
Date: Sat Nov 14 2026 - 11:05:33 EST
On Sat, 2026-11-14 at 16:23 +0100, Alejandro Colomar wrote:
> strprefix shadows a function of the same name. Let's rename it.
[]
> diff --git a/drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/spmobj-attributes.c
[]
> @@ -87,13 +87,13 @@ int hp_populate_security_buffer(u16 *authbuf, const char *authentication)
> */
>
> /* append UTF_PREFIX to part and then convert it to unicode */
> - strprefix = kasprintf(GFP_KERNEL, "%s%s", UTF_PREFIX,
> + prefix = kasprintf(GFP_KERNEL, "%s%s", UTF_PREFIX,
> authentication);
> - if (!strprefix)
> + if (!prefix)
> return -ENOMEM;
>
> - auth = hp_ascii_to_utf16_unicode(auth, strprefix);
> - kfree(strprefix);
> + auth = hp_ascii_to_utf16_unicode(auth, prefix);
unassociated defect but the auth buffer isn't apparently sized
so some write beyond buffer seems possible.