Unverified Commit bf68ce21 by Edward Thomson Committed by GitHub

Merge pull request #6593 from libgit2/ethomson/pcre-8.45

deps: update pcre to 8.45
parents 2b55e59f c02fe8d2
...@@ -19,13 +19,13 @@ THE BASIC LIBRARY FUNCTIONS ...@@ -19,13 +19,13 @@ THE BASIC LIBRARY FUNCTIONS
--------------------------- ---------------------------
Written by: Philip Hazel Written by: Philip Hazel
Email local part: ph10 Email local part: Philip.Hazel
Email domain: cam.ac.uk Email domain: gmail.com
University of Cambridge Computing Service, University of Cambridge Computing Service,
Cambridge, England. Cambridge, England.
Copyright (c) 1997-2020 University of Cambridge Copyright (c) 1997-2021 University of Cambridge
All rights reserved. All rights reserved.
...@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg ...@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Email domain: freemail.hu Email domain: freemail.hu
Copyright(c) 2010-2020 Zoltan Herczeg Copyright(c) 2010-2021 Zoltan Herczeg
All rights reserved. All rights reserved.
...@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg ...@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester Email local part: hzmester
Email domain: freemail.hu Email domain: freemail.hu
Copyright(c) 2009-2020 Zoltan Herczeg Copyright(c) 2009-2021 Zoltan Herczeg
All rights reserved. All rights reserved.
......
...@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. ...@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */ /* The current PCRE version information. */
#define PCRE_MAJOR 8 #define PCRE_MAJOR 8
#define PCRE_MINOR 44 #define PCRE_MINOR 45
#define PCRE_PRERELEASE #define PCRE_PRERELEASE
#define PCRE_DATE 2020-02-12 #define PCRE_DATE 2021-06-15
#define PCRE_EXP_DECL extern #define PCRE_EXP_DECL extern
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language. and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel Written by Philip Hazel
Copyright (c) 1997-2020 University of Cambridge Copyright (c) 1997-2021 University of Cambridge
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
...@@ -9104,6 +9104,8 @@ pcre_uchar cworkspace[COMPILE_WORK_SIZE]; ...@@ -9104,6 +9104,8 @@ pcre_uchar cworkspace[COMPILE_WORK_SIZE];
similar way to cworkspace, it can be expanded using malloc() if necessary. */ similar way to cworkspace, it can be expanded using malloc() if necessary. */
named_group named_groups[NAMED_GROUP_LIST_SIZE]; named_group named_groups[NAMED_GROUP_LIST_SIZE];
cd->named_groups = named_groups;
cd->named_group_list_size = NAMED_GROUP_LIST_SIZE;
/* Set this early so that early errors get offset 0. */ /* Set this early so that early errors get offset 0. */
...@@ -9377,8 +9379,6 @@ cd->hwm = cworkspace; ...@@ -9377,8 +9379,6 @@ cd->hwm = cworkspace;
cd->iscondassert = FALSE; cd->iscondassert = FALSE;
cd->start_workspace = cworkspace; cd->start_workspace = cworkspace;
cd->workspace_size = COMPILE_WORK_SIZE; cd->workspace_size = COMPILE_WORK_SIZE;
cd->named_groups = named_groups;
cd->named_group_list_size = NAMED_GROUP_LIST_SIZE;
cd->start_pattern = (const pcre_uchar *)pattern; cd->start_pattern = (const pcre_uchar *)pattern;
cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern)); cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
cd->req_varyopt = 0; cd->req_varyopt = 0;
...@@ -9489,6 +9489,7 @@ if (cd->names_found > 0) ...@@ -9489,6 +9489,7 @@ if (cd->names_found > 0)
add_name(cd, ng->name, ng->length, ng->number); add_name(cd, ng->name, ng->length, ng->number);
if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE) if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
(PUBL(free))((void *)cd->named_groups); (PUBL(free))((void *)cd->named_groups);
cd->named_group_list_size = 0; /* So we don't free it twice */
} }
/* Set up a starting, non-extracting bracket, then compile the expression. On /* Set up a starting, non-extracting bracket, then compile the expression. On
...@@ -9639,6 +9640,8 @@ if (errorcode != 0) ...@@ -9639,6 +9640,8 @@ if (errorcode != 0)
{ {
(PUBL(free))(re); (PUBL(free))(re);
PCRE_EARLY_ERROR_RETURN: PCRE_EARLY_ERROR_RETURN:
if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
(PUBL(free))((void *)cd->named_groups);
*erroroffset = (int)(ptr - (const pcre_uchar *)pattern); *erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
PCRE_EARLY_ERROR_RETURN2: PCRE_EARLY_ERROR_RETURN2:
*errorptr = find_error_text(errorcode); *errorptr = find_error_text(errorcode);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language. and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel Written by Philip Hazel
Copyright (c) 1997-2018 University of Cambridge Copyright (c) 1997-2021 University of Cambridge
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
...@@ -758,7 +758,7 @@ for (;;) ...@@ -758,7 +758,7 @@ for (;;)
md->mark = NULL; /* In case previously set by assertion */ md->mark = NULL; /* In case previously set by assertion */
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md, RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
eptrb, RM55); eptrb, RM55);
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) && if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT || rrc == MATCH_KETRPOS) &&
md->mark == NULL) md->mark = ecode + 2; md->mark == NULL) md->mark = ecode + 2;
/* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an /* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment