Skip to content

Fix nil pointer dereference in addLink when HTML parse fails#51

Merged
mattn merged 1 commit into
mainfrom
fix-addlink-embed-nil
Jun 5, 2026
Merged

Fix nil pointer dereference in addLink when HTML parse fails#51
mattn merged 1 commit into
mainfrom
fix-addlink-embed-nil

Conversation

@mattn

@mattn mattn commented Jun 5, 2026

Copy link
Copy Markdown
Owner

In the fallback branch where external link card HTML parsing fails, post.Embed may still be nil, causing a nil pointer dereference when assigning post.Embed.EmbedExternal. Initialize post.Embed before use.

When external link card HTML parsing fails, post.Embed could still be
nil, leading to a nil pointer dereference on post.Embed.EmbedExternal.
Initialize post.Embed before assigning.
@mattn mattn merged commit 29da223 into main Jun 5, 2026
2 checks passed
@mattn mattn deleted the fix-addlink-embed-nil branch June 5, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant