Skip to content

Commit e9a40f6

Browse files
adamsitniktmds
andauthored
System.Console: remove terminfo file size check (#82038) (#82433)
# Conflicts: # src/libraries/System.Console/src/System/TermInfo.DatabaseFactory.cs Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
1 parent b4f44f7 commit e9a40f6

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)