| Age | Commit message (Collapse) | Author |
|
|
|
In addition of the current possibility to filter wrappers by their
protocol name, also add the option to filter the "php" wrapper by the
requested kind.
Especially the 'filter' backend can be disabled that way.
|
|
Annotate the common logging function sp_log_msgf() with the format
attribute so compilers can check the used format string and passed
arguments for discrepancies.
Adjust the lineno printing by using %zu and the type size_t
consistently.
|
|
src/sp_unserialize.c: In function 'zif_sp_unserialize':
src/sp_unserialize.c:131:15: warning: unused variable 'orig_handler' [-Wunused-variable]
131 | zif_handler orig_handler = zend_hash_str_find_ptr(SPG(sp_internal_functions_hook), ZEND_STRL("unserialize"));
| ^~~~~~~~~~~~
|
|
|
|
|
|
|
|
Adjusts casts to void dropping const qualifiers. This helps to avoid
mistakes, e.g. modifying string literals.
Also use size_t for length, similar to the upstream php interfaces.
|
|
Avoid missing prototype warnings by declaring variables and functions
that are only used in a single file static.
|
|
Use the special value void as parameter for functions taking nor
argument.
|
|
|
|
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)))
| ^~~~~
|
|
|
|
|
|
|
|
This should help diagnose https://github.com/jvoisin/snuffleupagus/issues/477
|
|
On violations of INI settings include the key and if appropriate the
value in the log message. This helps to locate offenders and fine tune
the configuration itself.
|
|
|
|
|
|
|
|
|
|
typo
|
|
typo
|
|
typo
|
|
This should fix `Warning: unserialize(): Extra data starting at offset 8 of 72 bytes in unserialize.php on line 4`.
On the flip side, it's not longer possible in PHP8.3 and above, when using
Snuffleupagus, to have other extensions hooking unserialize().
|
|
|
|
- use long variant of options for re2c in its makefile
- use `define` instead of magic numbers
- add some consts
- trailing `;` are now mandatory for conditions
- NULL bytes are no longer allowed in configuration file
- the parser shouldn't crash in the absence of trailing new line at the end of its configuration file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This reverts commit 90bdf39000d2f09534b387d39203819995fb948e.
Caused compilation failure with PHP compiled with ZTS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|