Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ private static bool TryOpen(string filePath, [NotNullWhen(true)] out SafeFileHan
{
// Read in all of the terminfo data
long termInfoLength = RandomAccess.GetLength(fd);
const int MaxTermInfoLength = 4096; // according to the term and tic man pages, 4096 is the terminfo file size max
const int HeaderLength = 12;
if (termInfoLength <= HeaderLength || termInfoLength > MaxTermInfoLength)
if (termInfoLength <= HeaderLength)
{
throw new InvalidOperationException(SR.IO_TermInfoInvalid);
}
Expand Down