summaryrefslogtreecommitdiff
path: root/src/sp_var_parser.c (follow)
AgeCommit message (Collapse)Author
2024-06-06Fix misc typosChristian Göttsche
2024-06-06Declare file local variables and functions staticChristian Göttsche
Avoid missing prototype warnings by declaring variables and functions that are only used in a single file static.
2024-06-06Reorder calloc(3) argumentsChristian Göttsche
Please GCC: In file included from /usr/include/php/20220829/Zend/zend.h:30, from /usr/include/php/20220829/main/php.h:31, from /usr/include/php/20220829/main/SAPI.h:20, from src/php_snuffleupagus.h:37, from src/sp_ifilter.c:1: src/sp_pcre_compat.h: In function 'sp_regexp_compile': src/sp_pcre_compat.h:38:36: warning: '__zend_calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1); | ^~~~~~~~~ /usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc' 199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size))) | ^~~~~ src/sp_pcre_compat.h:38:36: note: earlier argument should specify number of elements, later size of each element 38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1); | ^~~~~~~~~ /usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc' 199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size))) | ^~~~~
2022-05-03Speed up a tiny bit `sp_parse_var`jvoisin
2022-02-05introduced sp_regexp / store original regexBen Fuhrmannek
2021-08-03fixed mem leak in parserBen Fuhrmannek
2021-08-02properly free memory on shutdownBen Fuhrmannek
2021-07-22Sprinkle some constjvoisin
2021-01-30Improve a bit the typing of the parserjvoisin
Use enum members instead of their numbers directly.
2020-11-06Constify a bit morejvoisin
2018-10-06Bump a bit the coveragejvoisin
* `setcookie` doesn't always return `true` anymore * clang-format * Cookies with invalid decryption are dropped, but the request isn't anymore * faulty unserialize are now dumpable
2018-02-07Use assertions for things that should never happenjvoisin
2018-02-06Make our API consistentjvoisin
2018-02-05Massive simplification of functions hookingjvoisin
2018-02-05Compatibility layer for pcre2jvoisin
This should close #129
2018-01-17Remove useless "head" member in our linked lists implementationsimon MAGNIN-FEYSOT
This should close #85
2017-12-28Clang-format passThibault "bui" Koechlin
- `clang-format --style="{BasedOnStyle: google, SortIncludes: false}" -i snuffleu*.c sp_*.c sp_*.h` - Update the documentation accordingly
2017-12-21Remove the now useless `validate_str` functionxXx-caillou-xXx
2017-12-21Rename, again, some typesjvoisin
2017-12-21Rename sp_node_t to sp_list_nodejvoisin
Since we now have sp_list and sp_tree, it makes sense to specify that nodes are only for lists.
2017-12-21Re-indent a bit a functionjvoisin
2017-12-21Minor code cleanupxXx-caillou-xXx
2017-12-20Refactor a bit the sp_tree implementationxXx-caillou-xXx
2017-12-20Better parsing of the rulesxXx-caillou-xXx
Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.