SpiderLabs/ModSecurity — pull request #8 by hideaki (2012-11-08 00:39:11+00:00)
Title: handle invalid escape sequence passed to strmatch operator

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.