[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dmidecode] [PATCH] Missing comma in the dmi_slot_type()
From: |
Jean Delvare |
Subject: |
Re: [dmidecode] [PATCH] Missing comma in the dmi_slot_type() |
Date: |
Thu, 10 Dec 2020 10:59:40 +0100 |
Hi Lianbo,
On Wed, 9 Dec 2020 22:01:16 +0800, Lianbo Jiang wrote:
> In the initialization of "type", a suspicious concatenated string
> "PCI Express Mini 76-pinPCI Express 4 SFF-8639 (U.2)" is produced
> due to a missing comma between lines.
>
> Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
> ---
> dmidecode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dmidecode.c b/dmidecode.c
> index ac96395d42c3..f7bd48203409 100644
> --- a/dmidecode.c
> +++ b/dmidecode.c
> @@ -1939,7 +1939,7 @@ static const char *dmi_slot_type(u8 code)
> "PCI Express 3 SFF-8639 (U.2)",
> "PCI Express Mini 52-pin with bottom-side keep-outs",
> "PCI Express Mini 52-pin without bottom-side keep-outs",
> - "PCI Express Mini 76-pin"
> + "PCI Express Mini 76-pin",
> "PCI Express 4 SFF-8639 (U.2)",
> "PCI Express 5 SFF-8639 (U.2)",
> "OCP NIC 3.0 Small Form Factor (SFF)",
Good catch, thanks for reporting. I have a script which I run on the
source code once in a while to spot array overruns, I added a check for
this case so that it gets caught faster if it happens again. Running it
on the latest version of dmidecode.c revealed another similar case (in
dmi_processor_characteristics) which I'll fix together with your
finding.
--
Jean Delvare
SUSE L3 Support