Skip to content

Commit 6c6ec41

Browse files
tmdsadamsitnik
authored andcommitted
System.Console: remove terminfo file size check (dotnet#82038)
# Conflicts: # src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs
1 parent 19fde2f commit 6c6ec41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libraries/System.Console/src/System/TermInfo.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,8 @@ private static bool TryOpen(string filePath, [NotNullWhen(true)] out SafeFileHan
258258
// Read in all of the terminfo data
259259
long termInfoLength = Interop.CheckIo(Interop.Sys.LSeek(fd, 0, Interop.Sys.SeekWhence.SEEK_END)); // jump to the end to get the file length
260260
Interop.CheckIo(Interop.Sys.LSeek(fd, 0, Interop.Sys.SeekWhence.SEEK_SET)); // reset back to beginning
261-
const int MaxTermInfoLength = 4096; // according to the term and tic man pages, 4096 is the terminfo file size max
262261
const int HeaderLength = 12;
263-
if (termInfoLength <= HeaderLength || termInfoLength > MaxTermInfoLength)
262+
if (termInfoLength <= HeaderLength)
264263
{
265264
throw new InvalidOperationException(SR.IO_TermInfoInvalid);
266265
}

0 commit comments

Comments
 (0)