diff '--exclude=debian' -ruN x/elvis-tiny-1.4.orig/cmd2.c elvis-tiny-1.4/cmd2.c
--- a/cmd2.c
+++ b/cmd2.c
@@ -591,6 +591,12 @@ void cmd_read(frommark, tomark, cmd, ban
 		msg("\"%s\" is not a regular file", extra);
 		return;
 	}
+	if (statb.st_size > 500000)
+	{
+		msg("\"%s\" is too large (>500000 bytes)", extra);
+		close(fd);
+		return;
+	}
 #endif /* not CRUNCH */
 
 	/* get blocks from the file, and add them */
--- a/tmp.c
+++ b/tmp.c
@@ -132,6 +132,13 @@ int tmpstart(filename)
 				msg("\"%s\" is not a regular file", origname);
 				return tmpstart("");
 			}
+			/* Can't edit files > 500.000 bytes */
+			if (statb.st_size > 500000)
+			{
+				msg("\"%s\" is too big (>500000 bytes)",
+					origname);
+				return tmpstart("");
+			}
 		}
 		else
 		{
