mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
fixes from review
- Makefile.in: restore iwyu target - regex_replacer_t::replace_matches(): correct size passed to realloc()
This commit is contained in:
parent
9ff7477a92
commit
ece7f35ec5
2 changed files with 10 additions and 4 deletions
|
@ -848,6 +848,13 @@ depend:
|
|||
./config.status
|
||||
.PHONY: depend
|
||||
|
||||
# Include What You Use
|
||||
iwyu:
|
||||
# Requires the --keep-going flag as it always returns 1
|
||||
# Can't set MAKEFLAGS on a target-specific basic
|
||||
$(MAKE) -k _iwyu CXX=include-what-you-use
|
||||
_iwyu: clean $(PROGRAMS)
|
||||
.PHONY: iwyu _iwyu
|
||||
|
||||
#
|
||||
# Cleanup targets
|
||||
|
|
|
@ -460,12 +460,11 @@ static const wchar_t *pcre2_strerror(int err_code)
|
|||
|
||||
struct compiled_regex_t
|
||||
{
|
||||
const wchar_t *argv0;
|
||||
pcre2_code *code;
|
||||
pcre2_match_data *match;
|
||||
|
||||
compiled_regex_t(const wchar_t *argv0_, const wchar_t *pattern, bool ignore_case)
|
||||
: argv0(argv0_), code(0), match(0)
|
||||
compiled_regex_t(const wchar_t *argv0, const wchar_t *pattern, bool ignore_case)
|
||||
: code(0), match(0)
|
||||
{
|
||||
// Disable some sequences that can lead to security problems
|
||||
uint32_t options = PCRE2_NEVER_UTF;
|
||||
|
@ -885,7 +884,7 @@ public:
|
|||
{
|
||||
if (outlen < MAX_REPLACE_SIZE)
|
||||
{
|
||||
outlen = std::max(2 * outlen, MAX_REPLACE_SIZE);
|
||||
outlen = std::min(2 * outlen, MAX_REPLACE_SIZE);
|
||||
output = (wchar_t *)realloc(output, sizeof(wchar_t) * outlen);
|
||||
if (output == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue