History log of /openbmc/libcper/sections/cper-section-nvidia.c (Results 1 – 2 of 2)
Revision Date Author Comments
# 379e492a 28-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

Adjust strncpy sizes

When building under bitbake with the latest openbmc, we get compile
warnings such as these:

```
| ../git/sections/cper-section-nvidia.c: In function 'ir_section_nvidia_to_cper'

Adjust strncpy sizes

When building under bitbake with the latest openbmc, we get compile
warnings such as these:

```
| ../git/sections/cper-section-nvidia.c: In function 'ir_section_nvidia_to_cper':
| ../git/sections/cper-section-nvidia.c:67:9: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
| 67 | strncpy(section_cper->Signature,
```

Using `strncpy` on its own is unsafe because a string too long will
end up in the destination buffer without NUL termination. Adjust
the strncpy to be one shorter than the buffer and force the trailing
byte to be a NUL.

Repeat this pattern for all `strncpy` calls.

Change-Id: I45c630733f0138d2b089a60f698d75e1c09de9e2
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 683e0550 07-Mar-2024 Karthik Rajagopalan <krajagopalan@nvidia.com>

Add support for NVIDIA CPERs

Support Nvidia CPER entries.

Change-Id: Iea9bde181ead55ad99cdb2a341501bf48e1d82a8
Signed-off-by: Ed Tanous <etanous@nvidia.com>