Commit aaa5737e authored by rswindell's avatar rswindell
Browse files

Keep Deuce from killing Vert by viewing 16GB log files:

Don't use P_OPENCLOSE printfile() mode for any files > 2MB in size.
parent ef02128f
......@@ -42,6 +42,9 @@
#define PRINTFILE_MAX_LINE_LEN (1024*1024)
#define PRINTFILE_MAX_FILE_LEN (1024*1024*2)
/* Prints a file remotely and locally, interpreting ^A sequences, checks */
......@@ -105,7 +108,7 @@ bool sbbs_t::printfile(const char* fname, long mode, long org_cols, JSObject* ob
return true;
if(mode&P_OPENCLOSE) {
if((mode&P_OPENCLOSE) && length <= PRINTFILE_MAX_FILE_LEN) {
if((buf=(char*)malloc(length+1L))==NULL) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment