Skip to content

Fix SmtpFailedRecipientsException constructor base null dereference - #138297

Merged
MihaZupan merged 1 commit into
dotnet:mainfrom
aaronfranke:fix-1.4-smtp-null-deref
Nov 25, 2026
Merged

MihaZupan merged 1 commit into
dotnet:mainfrom
aaronfranke:fix-1.4-smtp-null-deref

Conversation

@aaronfranke

Copy link
Copy Markdown
Contributor

This constructor reads innerExceptions in base before ArgumentNullException.ThrowIfNull(innerExceptions); is reached, so it fails in base instead of failing in the intended ArgumentNullException.ThrowIfNull(innerExceptions);.

An alternative fix would be to move this logic into the function body, outside of base. I kept it as-is because adding ? is a simpler change and fits the style of this file, but let me know if that's desired.

Minimal reproduction project: smtp-failedrecipients-null.zip


AI usage disclaimer: I encountered these .NET runtime bugs when using an AI to work on an unrelated project. I had it fix the bugs as it went, and now I am submitting fixes to each after manually reviewing the changes, and fixing them as needed. Most of these lines of code are AI-generated, including the tests and the MRP. The PR description and commit message are entirely human-written, as is always the case with every PR I open.

This constructor reads `innerExceptions` in `base` before
`ArgumentNullException.ThrowIfNull(innerExceptions);` is reached.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 25, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@MihaZupan MihaZupan added this to the 12.0.0 milestone Nov 25, 2026
@MihaZupan
MihaZupan enabled auto-merge (squash) November 25, 2026 17:52
@MihaZupan

Copy link
Copy Markdown
Member

/ba-g #138301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Net community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants