summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/joe/files/joe-3.1-overflow.patch')
-rw-r--r--app-editors/joe/files/joe-3.1-overflow.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/app-editors/joe/files/joe-3.1-overflow.patch b/app-editors/joe/files/joe-3.1-overflow.patch
new file mode 100644
index 000000000000..c30822631d92
--- /dev/null
+++ b/app-editors/joe/files/joe-3.1-overflow.patch
@@ -0,0 +1,12 @@
+--- rc.c~ 2004-05-28 17:37:30.000000000 +0100
++++ rc.c 2004-11-16 20:33:47.000000000 +0000
+@@ -810,7 +810,8 @@
+ int line = 0; /* Line number */
+ int err = 0; /* Set to 1 if there was a syntax error */
+
+- strcpy((char *)buf, (char *)name);
++ strncpy((char *)buf, (char *)name, sizeof(buf) - 1);
++ buf[sizeof(buf)-1] = '\0';
+ #ifdef __MSDOS__
+ fd = fopen((char *)buf, "rt");
+ #else