summaryrefslogtreecommitdiff
path: root/ext/ncurses/ncurses_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ncurses/ncurses_functions.c')
-rw-r--r--ext/ncurses/ncurses_functions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ncurses/ncurses_functions.c b/ext/ncurses/ncurses_functions.c
index c019f34300..d49ab39623 100644
--- a/ext/ncurses/ncurses_functions.c
+++ b/ext/ncurses/ncurses_functions.c
@@ -1768,7 +1768,7 @@ PHP_FUNCTION(ncurses_termname)
IS_NCURSES_INITIALIZED();
- strncpy(temp, termname(), sizeof(temp) - 1);
+ strlcpy(temp, termname(), sizeof(temp) - 1);
temp[sizeof(temp) - 1] = '\0';
RETURN_STRINGL (temp, strlen(temp), 1);
@@ -1783,7 +1783,7 @@ PHP_FUNCTION(ncurses_longname)
IS_NCURSES_INITIALIZED();
- strncpy(temp, longname(), sizeof(temp) - 1);
+ strlcpy(temp, longname(), sizeof(temp) - 1);
temp[sizeof(temp) - 1] = '\0';
RETURN_STRINGL (temp, strlen(temp), 1);