Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

hailaz
Copy link
Contributor

@hailaz hailaz commented May 16, 2025

修复没有做handler参数数量判断导致可能出现的数组越界问题

@hailaz hailaz added the bug It is confirmed a bug, but don't worry, we'll handle it. label May 16, 2025
@hailaz hailaz requested a review from Copilot May 16, 2025 09:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a potential array out-of-bound issue in the GetMetaTag method by adding checks for nil pointers and ensuring the handler has the expected number of parameters.

  • Added a compound conditional to validate h, h.Info.Type, and that h.Info.Type.NumIn() equals 2 before proceeding.

@cyjaysong
Copy link
Contributor

SGTM

@hailaz hailaz merged commit 6637add into master Jun 19, 2025
19 of 23 checks passed
@hailaz hailaz deleted the fix/ghttpmetatag branch June 19, 2025 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug It is confirmed a bug, but don't worry, we'll handle it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants