Skip to content

fix: add nil checks to prevent nil pointer dereferences#299

Open
sevico wants to merge 1 commit into
XiaoMi:mainfrom
sevico:fix/nil-pointer-dereferences
Open

fix: add nil checks to prevent nil pointer dereferences#299
sevico wants to merge 1 commit into
XiaoMi:mainfrom
sevico:fix/nil-pointer-dereferences

Conversation

@sevico
Copy link
Copy Markdown

@sevico sevico commented Apr 4, 2026

  • GetConnectionID: return early when conn is nil instead of proceeding to dereference nil conn, which would panic
  • writePublicKeyAuthPacketSha256: check pem.Decode result before accessing block.Bytes, preventing panic on malformed auth data

- GetConnectionID: return early when conn is nil instead of proceeding
  to dereference nil conn, which would panic
- writePublicKeyAuthPacketSha256: check pem.Decode result before
  accessing block.Bytes, preventing panic on malformed auth data
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