[rtems commit] psxhdrs/strncat: Fix string truncation warning
Sebastian Huber
sebh at rtems.org
Thu Jul 30 12:58:13 UTC 2020
Module: rtems
Branch: master
Commit: 699f465c50ca3af004673c650f645f78d250624b
Changeset: http://git.rtems.org/rtems/commit/?id=699f465c50ca3af004673c650f645f78d250624b
Author: Aschref Ben Thabet <aschref.ben-thabet at embedded-brains.de>
Date: Thu Jul 30 14:47:03 2020 +0200
psxhdrs/strncat: Fix string truncation warning
---
testsuites/psxtests/psxhdrs/string/strncat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuites/psxtests/psxhdrs/string/strncat.c b/testsuites/psxtests/psxhdrs/string/strncat.c
index 730a56c..d872be3 100644
--- a/testsuites/psxtests/psxhdrs/string/strncat.c
+++ b/testsuites/psxtests/psxhdrs/string/strncat.c
@@ -45,7 +45,7 @@
char buffer[SIZE] = "computer";
char *result;
- result = strncat( buffer, " program", 3 );
+ result = strncat( buffer, " program", sizeof( buffer ) - 1 );
return ( result != NULL );
}
More information about the vc
mailing list