Skip to content

fix: [BUG] runtime error in (*routeRegexp).Match#786

Open
majiayu000 wants to merge 1 commit intogorilla:mainfrom
majiayu000:fix-749-bug-runtime-error-in-routerege-0101-1707
Open

fix: [BUG] runtime error in (*routeRegexp).Match#786
majiayu000 wants to merge 1 commit intogorilla:mainfrom
majiayu000:fix-749-bug-runtime-error-in-routerege-0101-1707

Conversation

@majiayu000
Copy link

Fixes #749

Changes

  • Add nil check in routeRegexp.Match to prevent panic when called with nil receiver
  • Add test to verify nil receiver handling returns false without panic

Add defensive nil check at the beginning of (*routeRegexp).Match method
to prevent nil pointer dereference panic when a nil routeRegexp is used.

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] runtime error in (*routeRegexp).Match

1 participant