summaryrefslogtreecommitdiff
path: root/textproc/agrep/files/patch-strncpy
blob: 258f9af23f62bd4a45cabb58f2a70db0471f5dc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- main.c	2003/11/12 14:09:11	1.1
+++ main.c	2003/11/12 14:09:31
@@ -751,7 +751,7 @@
   }
   if (!(PAT_FILE) && Pattern[0] == '\0') { /* Pattern not set with -e option */
     if (argc == 0) usage();
-    strcpy(Pattern, *argv); 
+    strncpy(Pattern, *argv, sizeof(Pattern)); 
     argc--;
     argv++;
   }