Skip to content

Getting error when running suricata on windows due to CRLF #15

@Compiler-Error

Description

@Compiler-Error

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions