Skip to content

Conversation

@chenuduss
Copy link
Contributor

what

correct handling result of CPTRetriveNode().

why

Function CPTRetriveNode may return NULL, and null check required

@sonarqubecloud
Copy link

@airween
Copy link
Member

airween commented Oct 24, 2025

Hi @chenuduss,

thanks for this PR, nice catch.

Just out of curiosity: have you faced any problem in practice with this error?

Or how did you catch it?

Btw: the PR looks good to me so after the discussion I'm going to merge this. And thanks again!

Note: in v2 this was fixed last year, see this PR. But as I see v2 contained already this explicit node check. This is interesting, because many functions were just copied from v2 into v3, and it seems like the author left the node check part.

@chenuduss
Copy link
Contributor Author

Just out of curiosity: have you faced any problem in practice with this error?
Or how did you catch it?

I found this using a static analyzer.

@airween airween merged commit 3d0440e into owasp-modsecurity:v3/master Oct 28, 2025
89 of 98 checks passed
@airween
Copy link
Member

airween commented Oct 28, 2025

Thanks again @chenuduss!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants