Skip to content

Commit 0fca66b

Browse files
committed
Fixed ncom bug
1 parent aa0342c commit 0fca66b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

com/ncom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ main(int argc, char *argv[])
139139

140140
opterr = 0;
141141

142-
while ((c = getopt(argc, argv, "d:umnvbh")) != -1 )
142+
while ((c = getopt(argc, argv, "d:nvbh")) != -1 )
143143
switch (c) {
144144
case 'v':
145145
die(VERSION);
@@ -161,7 +161,7 @@ main(int argc, char *argv[])
161161
}
162162

163163
if (optind < argc) {
164-
strcpy(filename, argv[optind]);
164+
strncpy(filename, argv[optind], 256);
165165
filename_given = 1;
166166
}
167167

0 commit comments

Comments
 (0)