owasp-modsecurity/ModSecurity

Error in msc_status_engine.c

Closed this issue · 5 comments

Describe the bug

In the apache2/msc_status_engine.c:176

The variable i is compared to 6 but i is not defined.
This i was removed in this commit
9d9a727#diff-1c8f9a366617177bdf8e978ba4be1230c2086c1f4d2338cb5e14e21b8162504e

I'm not sure if it is still compiling with the DARWIN flag

Hi @Greentears,

thanks, you're right, that's a bug.

And it seems that we should extend our CI with an OSX build to avoid this kind of issues. I'm going to fix this soon.

@Greentears,

unfortunately I don't have any Darwin environment so I can't check other errors - is there any other issue which blocks the build flow?

Hello @airween,
Sorry I actually don't know, I was just reviewing changes done those last few months

I made some research and this is what I found:

  • here is the initial version of this file/feature
  • and here is where the author removed the loop which used variable i

Therefore the i is not necessary at all, because it's a constant, its value never changes. I'm going to prepare the fix.

See #3412.