Skip to content

fix: networkanimator does no bounds check when reading parameters - #4090

Merged
NoelStephensUnity merged 6 commits into
develop-2.0.0from
fix/UUM-147271-networkanimator-bounds-check
Jul 16, 2026
Merged

fix: networkanimator does no bounds check when reading parameters#4090
NoelStephensUnity merged 6 commits into
develop-2.0.0from
fix/UUM-147271-networkanimator-bounds-check

Conversation

@NoelStephensUnity

@NoelStephensUnityNoelStephensUnity commented Jul 16, 2026

Copy link
Copy Markdown
Member

Purpose of this PR

NetworkAnimator can cause an exception and/or crash if a parameter update is received with an invalid parameter index value.

Jira ticket

UUM-147271

Changelog

  • Fixed: Issue where NetworkAnimator did no bounds check on the parameter index read prior to obtaining a pointer to the location within the array.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests
    • NetworkAnimatorTests.ParameterBoundsCheck

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports

No back port is required.

Up-port

This fix will be included in the last full merge after the v2.13.1 update.

Adding bounds check for reading NetworkAnimator parameters.
Adding a unit test to validate the bounds check.
@NoelStephensUnityNoelStephensUnity changed the title fix: networkanimator does not bounds check when reading parametersfix: networkanimator does no bounds check when reading parametersJul 16, 2026
@NoelStephensUnity
NoelStephensUnity marked this pull request as ready for review July 16, 2026 16:56
@NoelStephensUnity
NoelStephensUnity requested a review from a team as a code ownerJuly 16, 2026 16:56
@codecov-github-com

codecov-github-comBot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@ Coverage Diff @@## develop-2.0.0 #4090 +/- ##
=================================================
+ Coverage 66.39% 66.40% +0.01% 
=================================================
Files 163 163 Lines 24999 24999 =================================================
+ Hits 16597 16601 +4 + Misses 8402 8398 -4 
FlagCoverage Δ
NGOv2_ubuntu_6000.366.40% <ø> (+0.01%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

ComponentsCoverage Δ
com.unity.netcode.gameobjects66.40% <ø> (+0.01%)⬆️

ℹ️ Need help interpreting these results?

@laruslarus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@NoelStephensUnity
NoelStephensUnity merged commit 8f8b25c into develop-2.0.0Jul 16, 2026
26 checks passed
@NoelStephensUnity
NoelStephensUnity deleted the fix/UUM-147271-networkanimator-bounds-check branch July 16, 2026 21:41
Sign up for freeto 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.

2 participants

@NoelStephensUnity@larus