Skip to content

文档内容流存在损坏的压缩流导致文档结构查看器返回的内容流不全 #308

@Charltsing

Description

@Charltsing

error.zip

Image

问题出在 \iTextSharp\core\iTextSharp\text\pdf\PdfReader.cs 的Flate解压缩函数
internal static byte[] FlateDecode(byte[] inp, MemoryStream outS)

//不能直接使用outS,会被close,导致下一句无法执行。 
byte[] b = FlateDecode(inp, true, new MemoryStream(outS.ToArray()));

itext-dotnet 在 FlateDecodeFilter.cs#L44 里已经改成不释放了。也不一定好。

Metadata

Metadata

Assignees

Labels

改进New feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions