Browse code

limit data we read from file to avoid DoS via large files

Hanno Böck authored on10/06/2020 10:15:22
Showing1 changed files
... ...
@@ -125,7 +125,7 @@ for fdir in opts.dirs:
125 125
                             file = open(mfile, errors='replace')
126 126
                         except OSError:
127 127
                             continue
128
-                        filestr = file.read()
128
+                        filestr = file.read(200000)
129 129
                         file.close()
130 130
 
131 131
                         if (('extra_match' in det