From 699f465c50ca3af004673c650f645f78d250624b Mon Sep 17 00:00:00 2001 From: Aschref Ben Thabet Date: Thu, 30 Jul 2020 14:47:03 +0200 Subject: psxhdrs/strncat: Fix string truncation warning --- testsuites/psxtests/psxhdrs/string/strncat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuites/psxtests/psxhdrs/string/strncat.c') diff --git a/testsuites/psxtests/psxhdrs/string/strncat.c b/testsuites/psxtests/psxhdrs/string/strncat.c index 730a56cfa6..d872be3408 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 ); } -- cgit v1.2.3