aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--textproc/agrep/files/patch-strncpy11
1 files changed, 11 insertions, 0 deletions
diff --git a/textproc/agrep/files/patch-strncpy b/textproc/agrep/files/patch-strncpy
new file mode 100644
index 000000000000..258f9af23f62
--- /dev/null
+++ b/textproc/agrep/files/patch-strncpy
@@ -0,0 +1,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++;
+ }