meer
meer copied to clipboard
Getting error when running suricata on windows due to CRLF
First off, this project is AMAZING. Coming from a DBA background, and being a huge fan of Suricata, thank you!
As you know, the line ending in windows is different. To address this, I had to change the util.c file on line 417 from this. if ( ( validate_string[ strlen(validate_string) - 1] != '}' ) && ( validate_string[ strlen(validate_string) - 2] != '}' ) )
to this if ( ( validate_string[ strlen(validate_string) - 3] != '}' ) && ( validate_string[ strlen(validate_string) - 4] != '}' ) )
C is not my strength, but I am willing to create a pull request to fix this once it is more clear what you think is the best way to fix it.
some ideas
- Check if this is running on Windows WSL and use the 3 and 4 solution
- Check if the file has CRLF endings and then use the 3 and 4 solution
- other?
Sorry for the delay! I just saw this. Can you give me an example file to use? I can create a patch based off that.