Skip to content

Fix security scan problems. v6.0.131#4100

Merged
winlinvip merged 3 commits intoossrs:developfrom
suzp1984:fix/security_scan_problems
Jun 21, 2024
Merged

Fix security scan problems. v6.0.131#4100
winlinvip merged 3 commits intoossrs:developfrom
suzp1984:fix/security_scan_problems

Conversation

@suzp1984
Copy link
Copy Markdown
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.

suzp1984 added 2 commits June 21, 2024 08:54
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
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.

Development

Successfully merging this pull request may close these issues.

2 participants