Fix compilation issues with strncat
Use remaining buf size as "num" argument instead of bytes to copy.
Change-Id: Ie9a721fdcdde605bcdfa850b47da472db7412362
Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
diff --git a/sections/cper-section-arm.c b/sections/cper-section-arm.c
index b56dc50..a1e9a2d 100644
--- a/sections/cper-section-arm.c
+++ b/sections/cper-section-arm.c
@@ -181,7 +181,8 @@
strlen(*desc_string) + err_info_desc_i_len <
SECTION_DESC_STRING_SIZE) {
strncat(*desc_string, err_info_desc_i,
- err_info_desc_i_len);
+ SECTION_DESC_STRING_SIZE -
+ strlen(*desc_string) - 1);
} else {
cper_print_log(
"Error: Error info description string too long, not added to description string: %s\n",