Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix security scan problems. v6.0.131 #4100

Merged
merged 3 commits into from
Jun 21, 2024

Conversation

suzp1984
Copy link
Contributor

  1. fix redundant null check, there is no potential risks by the way, just redundant null check.
  2. Potential use pointer after free, that's not true. So we can ignore this one, or find a way to make stupid security tool happy.

ph is a pointer to pointer, which is used to pass a pointer,
entry->stream, out of the method, and ph already dereferenced
on the begining of this method, so it's impossible to be null.
`ISrsHttpHander* h = *ph ? *ph : NULL`
security scan said use pointer after free, actually it's not true,
it's totally safe here, so free pointer in another name, check
the stupid security tool's response.
@suzp1984 suzp1984 requested a review from winlinvip June 21, 2024 01:22
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jun 21, 2024
@winlinvip winlinvip changed the title Fix security scan problems Fix security scan problems. v6.0.131 Jun 21, 2024
@winlinvip winlinvip added the RefinedByAI Refined by AI/GPT. label Jun 21, 2024
@winlinvip winlinvip merged commit ea7e2c2 into ossrs:develop Jun 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EnglishNative This issue is conveyed exclusively in English. RefinedByAI Refined by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants