Skip to content

Commit f1923fc

Browse files
committed
Increase FlateFilter multiplier when preventing malicious OOM and fix UglyToad#1125
1 parent 7ff5889 commit f1923fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/UglyToad.PdfPig/PdfExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ private static double GetEstimatedSizeMultiplier(IFilter filter)
112112
{
113113
AsciiHexDecodeFilter => 0.5,
114114
Ascii85Filter => 0.8,
115-
FlateFilter or RunLengthFilter => 3,
115+
RunLengthFilter => 1.5,
116116
LzwFilter => 2,
117+
FlateFilter => 10,
117118
_ => 1000
118119
};
119120
}

0 commit comments

Comments
 (0)