[prev in list] [next in list] [prev in thread] [next in thread]
List: fwts-devel
Subject: ACK: [PATCH] acpi: gpedump: ensure buf is set on default case
From: ivanhu <ivan.hu () canonical ! com>
Date: 2020-04-08 6:43:31
Message-ID: d9bb03af-be27-d689-43c1-81d15c1a130b () canonical ! com
[Download RAW message or body]
On 4/8/20 1:25 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is no default case in the switch statement and Coverity is
> complaining that buffer buf is not being initialized. Cater for this
> unlikely eventuality.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> src/acpi/gpedump/gpedump.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/acpi/gpedump/gpedump.c b/src/acpi/gpedump/gpedump.c
> index 38e03149..faf69bdf 100644
> --- a/src/acpi/gpedump/gpedump.c
> +++ b/src/acpi/gpedump/gpedump.c
> @@ -85,6 +85,9 @@ static void gpu_dump_gpes(
> n++;
> snprintf(buf, sizeof(buf), "notifies %" PRIu32 " devices", n);
> break;
> + default:
> + strncpy(buf, "unknown", sizeof(buf));
> + break;
> }
> fwts_log_info_verbatim(fw, " GPE 0x%2.2" PRIx8 ":",
> gpe_block_info->BlockBaseNumber + gpe);
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
--
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic