diff options
author | Aschref Ben Thabet <aschref.ben-thabet@embedded-brains.de> | 2020-07-30 14:47:03 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-07-30 14:57:57 +0200 |
commit | 699f465c50ca3af004673c650f645f78d250624b (patch) | |
tree | f938ef3e94f1fca3df28efac0012b3d4df4a28c8 /testsuites/psxtests/psxhdrs/string/strncat.c | |
parent | 21c7e3a41f1590b18c2c3f883e2b63e36cc409aa (diff) |
psxhdrs/strncat: Fix string truncation warning
Diffstat (limited to '')
-rw-r--r-- | testsuites/psxtests/psxhdrs/string/strncat.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 ); } |