Skip to content

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

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

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
Copy Markdown

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>
@majiayu000
Copy link
Copy Markdown
Author

Closing this PR due to extended inactivity. Happy to reopen if there's still interest — feel free to comment.

@majiayu000 majiayu000 closed this Mar 20, 2026
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