[MXS-875] regexfilter logs everything as a match Created: 2016-09-22 Updated: 2016-09-23 Resolved: 2016-09-22 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | regexfilter |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | 2.0.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | markus makela | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
When doing a match-and-replace operation on the query string, the filter first checks if the query matches before allocating more memory to do the operation. Instead of interpreting only positive return values as matches, the matching code mistakenly interprets all non-zero return values as positive matches. |
| Comments |
| Comment by markus makela [ 2016-09-22 ] |
|
The fix was to check for positive return values from pcre2_match instead of non-zero return values. The matching and the related logging now works again. |