From ae7c4bf675878ae258a6e5609f4c6cfe37b0ddca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20DEL=20NERO?= Date: Tue, 14 Nov 2023 23:58:30 +0100 Subject: [PATCH] fix genos_strndstcat function. --- lib_jtag_core/src/os_interface/os_interface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib_jtag_core/src/os_interface/os_interface.c b/lib_jtag_core/src/os_interface/os_interface.c index cae0c80..52b45cb 100644 --- a/lib_jtag_core/src/os_interface/os_interface.c +++ b/lib_jtag_core/src/os_interface/os_interface.c @@ -659,6 +659,11 @@ char * genos_strndstcat( char *dest, const char *src, size_t maxdestsize ) i++; j++; } + + if( i < maxdestsize ) + { + dest[i] = '\0'; + } } return dest;