[PR #10] [MERGED] Fix issues with 0-length streams #43

Open
opened 2026-01-30 21:26:53 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/claunia/plist-cil/pull/10
Author: @qmfrederik
Created: 5/24/2016
Status: Merged
Merged: 6/22/2016
Merged by: @claunia

Base: masterHead: fixes/0-length-stream


📝 Commits (1)

  • 12418b7 Fix issue when handling 0-length streams.

📊 Changes

3 files changed (+25 additions, -9 deletions)

View changed files

plist-cil.test/PropertyListParserTests.cs (+20 -0)
📝 plist-cil.test/plist-cil.test.csproj (+1 -0)
📝 plist-cil/PropertyListParser.cs (+4 -9)

📄 Description

When parsing a stream, it can happen that the stream is 0-length (or, more likely, that you're at the end of the stream by accident).

This would cause an index out of range exception in the PropertyListParser. This PR fixes that and also optimizes how ReadAll is implemented.

Hope it helps!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/claunia/plist-cil/pull/10 **Author:** [@qmfrederik](https://github.com/qmfrederik) **Created:** 5/24/2016 **Status:** ✅ Merged **Merged:** 6/22/2016 **Merged by:** [@claunia](https://github.com/claunia) **Base:** `master` ← **Head:** `fixes/0-length-stream` --- ### 📝 Commits (1) - [`12418b7`](https://github.com/claunia/plist-cil/commit/12418b7284e500449c22ed08c10a9551177d9192) Fix issue when handling 0-length streams. ### 📊 Changes **3 files changed** (+25 additions, -9 deletions) <details> <summary>View changed files</summary> ➕ `plist-cil.test/PropertyListParserTests.cs` (+20 -0) 📝 `plist-cil.test/plist-cil.test.csproj` (+1 -0) 📝 `plist-cil/PropertyListParser.cs` (+4 -9) </details> ### 📄 Description When parsing a stream, it can happen that the stream is 0-length (or, more likely, that you're at the end of the stream by accident). This would cause an index out of range exception in the `PropertyListParser`. This PR fixes that and also optimizes how ReadAll is implemented. Hope it helps! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-30 21:26:53 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claunia/plist-cil#43