Skip to content

Conversation

hideaki
Copy link
Contributor

@hideaki hideaki commented Nov 8, 2012

This is fix for a coredump that happens at startup time when @strmatch operator has invalid escape sequence like following.

SecRule ARGS:value "@strmatch 89\xb6xagxga\x0a3" "phase:1,log,deny"

I'm handling the case where parse_pm_content returns NULL because of error
conditions like broken escape sequence or insufficient memory etc.

After this patch, error that looks like following is printed at startup instead of segmentation fault.

Syntax error on line 2 of /scratch/hihayash/conf/modsec.conf:
Error creating rule: Unsupported escape sequence.

brenosilva added a commit that referenced this pull request Nov 9, 2012
handle invalid escape sequence passed to strmatch operator
@brenosilva brenosilva merged commit b31f83b into owasp-modsecurity:remotes/trunk Nov 9, 2012
@pbesedm pbesedm mentioned this pull request May 8, 2015
@pbesedm pbesedm mentioned this pull request Mar 12, 2016
@wergoth wergoth mentioned this pull request Jul 25, 2017
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