summaryrefslogtreecommitdiff
path: root/test/GNU/table-from.c
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2023-12-18 20:07:55 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2023-12-18 20:07:55 +0000
commit51deb6711a845e8797f3818d4d453bb29ac1a951 (patch)
treee4bc00e2e20784c01fcad5858582fc2b5d511863 /test/GNU/table-from.c
parent26fef05c3f3761030c9f38018cd26ccccc6f6aa6 (diff)
downloadiconv-51deb6711a845e8797f3818d4d453bb29ac1a951.tar.gz
iconv-51deb6711a845e8797f3818d4d453bb29ac1a951.tar.bz2
Fix strncpy buffer lengths
Diffstat (limited to 'test/GNU/table-from.c')
-rw-r--r--test/GNU/table-from.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/GNU/table-from.c b/test/GNU/table-from.c
index 56a0dab..92300d6 100644
--- a/test/GNU/table-from.c
+++ b/test/GNU/table-from.c
@@ -126,7 +126,7 @@ int main (int argc, char* argv[])
exit(1);
}
- strncpy(aliases, ucpath, sizeof(aliases));
+ strncpy(aliases, ucpath, sizeof(aliases) - 1);
alen = strlen(ucpath);
#ifndef __riscos__
if (aliases[alen - 1] != '/') {