Skip to content

Epoll: Add null checks for safety reasons#16454

Merged
chrisvest merged 1 commit into
4.2from
null_check
Mar 13, 2026
Merged

Epoll: Add null checks for safety reasons#16454
chrisvest merged 1 commit into
4.2from
null_check

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

We did not check for NULL when calling GetObjectArrayElement which could be returned if we try to access an element that is out of bounds. While this should never happen we should better still guard against it to make the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code

Motivation:

We did not check for NULL when calling GetObjectArrayElement which could be returned if we try to access an element that is out of bounds. While this should never happen we should better still guard against it to make the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code
@normanmaurer normanmaurer added this to the 4.2.11.Final milestone Mar 13, 2026
@normanmaurer normanmaurer added needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. labels Mar 13, 2026
@normanmaurer
Copy link
Copy Markdown
Member Author

This is just some "cleanup" to make the code more robust.

@chrisvest chrisvest merged commit 342c1c0 into 4.2 Mar 13, 2026
24 checks passed
@chrisvest chrisvest deleted the null_check branch March 13, 2026 20:38
netty-project-bot pushed a commit that referenced this pull request Mar 13, 2026
Motivation:

We did not check for NULL when calling GetObjectArrayElement which could
be returned if we try to access an element that is out of bounds. While
this should never happen we should better still guard against it to make
the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code

(cherry picked from commit 342c1c0)
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 5.0: #16462

@github-actions github-actions Bot removed the needs-cherry-pick-5.0 This PR should be cherry-picked to 5.0 once merged. label Mar 13, 2026
netty-project-bot pushed a commit that referenced this pull request Mar 13, 2026
Motivation:

We did not check for NULL when calling GetObjectArrayElement which could
be returned if we try to access an element that is out of bounds. While
this should never happen we should better still guard against it to make
the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code

(cherry picked from commit 342c1c0)
@netty-project-bot
Copy link
Copy Markdown
Contributor

Auto-port PR for 4.1: #16463

@github-actions github-actions Bot removed the needs-cherry-pick-4.1 This PR should be cherry-picked to 4.1 once merged. label Mar 13, 2026
chrisvest pushed a commit that referenced this pull request Mar 13, 2026
Auto-port of #16454 to 4.1
Cherry-picked commit: 342c1c0

---
Motivation:

We did not check for NULL when calling GetObjectArrayElement which could
be returned if we try to access an element that is out of bounds. While
this should never happen we should better still guard against it to make
the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
chrisvest pushed a commit that referenced this pull request Mar 14, 2026
Auto-port of #16454 to 5.0
Cherry-picked commit: 342c1c0

---
Motivation:

We did not check for NULL when calling GetObjectArrayElement which could
be returned if we try to access an element that is out of bounds. While
this should never happen we should better still guard against it to make
the code less error-prone.

Modifications:

Add NULL check

Result:

More correct code

Co-authored-by: Norman Maurer <norman_maurer@apple.com>
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.

3 participants