summaryrefslogtreecommitdiffhomepage
path: root/libbb/getpty.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/getpty.c')
-rw-r--r--libbb/getpty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbb/getpty.c b/libbb/getpty.c
index c006e34f5..36b3c6842 100644
--- a/libbb/getpty.c
+++ b/libbb/getpty.c
@@ -10,7 +10,9 @@
#define DEBUG 0
-int getpty(char *line, int size)
+#define DEBUG 0
+
+int getpty(char *line)
{
int p;
#if ENABLE_FEATURE_DEVPTS
@@ -24,7 +26,7 @@ int getpty(char *line, int size)
bb_perror_msg("ptsname error (is /dev/pts mounted?)");
return -1;
}
- safe_strncpy(line, name, size);
+ safe_strncpy(line, name, GETPTY_BUFSIZE);
return p;
}
#else