[PR #4212] [MERGED] Null Pointer fix: BaseControlHandler.cs #9949

Closed
opened 2026-02-07 06:11:20 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/4212
Author: @BaronGreenback
Created: 9/25/2020
Status: Merged
Merged: 10/10/2020
Merged by: @dkanada

Base: masterHead: BaseControlHandlerFix


📝 Commits (10+)

  • 86ad04b Update DescriptionXmlBuilder.cs
  • c2e2e5a Update DescriptionXmlBuilder.cs
  • a6400d1 Update DescriptionXmlBuilder.cs
  • d99db54 Update DescriptionXmlBuilder.cs
  • 293237b Update BaseControlHandler.cs
  • 12b5f11 Update DescriptionXmlBuilder.cs
  • f3a90ba Update DescriptionXmlBuilder.cs
  • a52ab69 Update DescriptionXmlBuilder.cs
  • 6357157 Update BaseControlHandler.cs
  • 7567779 Update BaseControlHandler.cs

📊 Changes

1 file changed (+19 additions, -6 deletions)

View changed files

📝 Emby.Dlna/Service/BaseControlHandler.cs (+19 -6)

📄 Description

The first instance in within a try/catch block in ProcessControlRequestAsync. It calls ProcessControlRequestInternalAsync, which in turn calls ParseRequestAsync.

ParseRequestAsync searches for a body tag - but returns an empty ControlRequestInfo object if none is found.

ProcessControlRequestInternalAsync proceeds to try and output settings from this object that aren't initialised (hence null pointer).

As the code is in an exception block, this won't currently crash, however, putting in the exception is a cleaner solution - and goes towards making the function nullable.

The second instance is in ParseBodyTagAsync where under certain circumstances it is possible to get an empty ControlRequestInfo object.

The final change is creating a constructor for ControlRequestInfo, which makes it nullable.


🔄 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/jellyfin/jellyfin/pull/4212 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 9/25/2020 **Status:** ✅ Merged **Merged:** 10/10/2020 **Merged by:** [@dkanada](https://github.com/dkanada) **Base:** `master` ← **Head:** `BaseControlHandlerFix` --- ### 📝 Commits (10+) - [`86ad04b`](https://github.com/jellyfin/jellyfin/commit/86ad04b6571a9e44744f135caac768e8f1acdcde) Update DescriptionXmlBuilder.cs - [`c2e2e5a`](https://github.com/jellyfin/jellyfin/commit/c2e2e5ac0ce298e550a02eeb2e853497d7f9e647) Update DescriptionXmlBuilder.cs - [`a6400d1`](https://github.com/jellyfin/jellyfin/commit/a6400d12c9bd8e32497f6510fe7491fd0325650a) Update DescriptionXmlBuilder.cs - [`d99db54`](https://github.com/jellyfin/jellyfin/commit/d99db543daf770a059830627dbdc255ae6abe42e) Update DescriptionXmlBuilder.cs - [`293237b`](https://github.com/jellyfin/jellyfin/commit/293237b714835fadd0a7c387815d146a2e4b810b) Update BaseControlHandler.cs - [`12b5f11`](https://github.com/jellyfin/jellyfin/commit/12b5f1127e0bef04173a9ad0f80b13e2ec86552f) Update DescriptionXmlBuilder.cs - [`f3a90ba`](https://github.com/jellyfin/jellyfin/commit/f3a90bab477ed7008c2569dcd3d89f21a92558fb) Update DescriptionXmlBuilder.cs - [`a52ab69`](https://github.com/jellyfin/jellyfin/commit/a52ab69e13d2b924522a21fa4da98f38ec298bd1) Update DescriptionXmlBuilder.cs - [`6357157`](https://github.com/jellyfin/jellyfin/commit/63571578ae04ec3b16f8cc5c5b2f9252de78aeda) Update BaseControlHandler.cs - [`7567779`](https://github.com/jellyfin/jellyfin/commit/75677791275792e8dcfae1e9361b93af75443a75) Update BaseControlHandler.cs ### 📊 Changes **1 file changed** (+19 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Dlna/Service/BaseControlHandler.cs` (+19 -6) </details> ### 📄 Description The first instance in within a try/catch block in ProcessControlRequestAsync. It calls ProcessControlRequestInternalAsync, which in turn calls ParseRequestAsync. ParseRequestAsync searches for a body tag - but returns an empty ControlRequestInfo object if none is found. ProcessControlRequestInternalAsync proceeds to try and output settings from this object that aren't initialised (hence null pointer). As the code is in an exception block, this won't currently crash, however, putting in the exception is a cleaner solution - and goes towards making the function nullable. The second instance is in ParseBodyTagAsync where under certain circumstances it is possible to get an empty ControlRequestInfo object. The final change is creating a constructor for ControlRequestInfo, which makes it nullable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:11:20 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#9949