summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 76a4f34f..8b518070 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -664,7 +664,7 @@ innstr(char *str, int n)
slp->data[slp->len] = 0;
strip_ansi(buf, (char*)slp->data, STRIP_ALL);
buf[ANSILINELEN] = 0;
- strncpy(str, buf, n);
+ strlcpy(str, buf, n);
return strlen(str);
}
@@ -676,8 +676,7 @@ inansistr(char *str, int n)
if (!slp)
return 0;
slp->data[slp->len] = 0;
- strncpy(str, (char*)slp->data, n);
- str[n] = 0;
+ strlcpy(str, (char*)slp->data, n);
return strlen(str);
}