Skip to content

Commit a03dfad

Browse files
[release/7.0] System.Console: allow terminfo files to be larger than 4KiB. (#82082)
* System.Console: allow terminfo files to be larger than 4KiB. * Remove file size check. --------- Co-authored-by: Tom Deseyn <[email protected]>
1 parent 60d5c56 commit a03dfad

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ private static bool TryOpen(string filePath, [NotNullWhen(true)] out SafeFileHan
107107
{
108108
// Read in all of the terminfo data
109109
long termInfoLength = RandomAccess.GetLength(fd);
110-
const int MaxTermInfoLength = 4096; // according to the term and tic man pages, 4096 is the terminfo file size max
111110
const int HeaderLength = 12;
112-
if (termInfoLength <= HeaderLength || termInfoLength > MaxTermInfoLength)
111+
if (termInfoLength <= HeaderLength)
113112
{
114113
throw new InvalidOperationException(SR.IO_TermInfoInvalid);
115114
}

0 commit comments

Comments
 (0)