Skip to content

Commit bf68ce2

Browse files
authored
Merge pull request libgit2#6593 from libgit2/ethomson/pcre-8.45
deps: update pcre to 8.45
2 parents 2b55e59 + c02fe8d commit bf68ce2

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

deps/pcre/LICENCE

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ THE BASIC LIBRARY FUNCTIONS
1919
---------------------------
2020

2121
Written by: Philip Hazel
22-
Email local part: ph10
23-
Email domain: cam.ac.uk
22+
Email local part: Philip.Hazel
23+
Email domain: gmail.com
2424

2525
University of Cambridge Computing Service,
2626
Cambridge, England.
2727

28-
Copyright (c) 1997-2020 University of Cambridge
28+
Copyright (c) 1997-2021 University of Cambridge
2929
All rights reserved.
3030

3131

@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg
3636
Email local part: hzmester
3737
Email domain: freemail.hu
3838

39-
Copyright(c) 2010-2020 Zoltan Herczeg
39+
Copyright(c) 2010-2021 Zoltan Herczeg
4040
All rights reserved.
4141

4242

@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg
4747
Email local part: hzmester
4848
Email domain: freemail.hu
4949

50-
Copyright(c) 2009-2020 Zoltan Herczeg
50+
Copyright(c) 2009-2021 Zoltan Herczeg
5151
All rights reserved.
5252

5353

deps/pcre/pcre.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
4242
/* The current PCRE version information. */
4343

4444
#define PCRE_MAJOR 8
45-
#define PCRE_MINOR 44
45+
#define PCRE_MINOR 45
4646
#define PCRE_PRERELEASE
47-
#define PCRE_DATE 2020-02-12
47+
#define PCRE_DATE 2021-06-15
4848

4949
#define PCRE_EXP_DECL extern
5050

deps/pcre/pcre_compile.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
and semantics are as close as possible to those of the Perl 5 language.
77
88
Written by Philip Hazel
9-
Copyright (c) 1997-2020 University of Cambridge
9+
Copyright (c) 1997-2021 University of Cambridge
1010
1111
-----------------------------------------------------------------------------
1212
Redistribution and use in source and binary forms, with or without
@@ -9104,6 +9104,8 @@ pcre_uchar cworkspace[COMPILE_WORK_SIZE];
91049104
similar way to cworkspace, it can be expanded using malloc() if necessary. */
91059105

91069106
named_group named_groups[NAMED_GROUP_LIST_SIZE];
9107+
cd->named_groups = named_groups;
9108+
cd->named_group_list_size = NAMED_GROUP_LIST_SIZE;
91079109

91089110
/* Set this early so that early errors get offset 0. */
91099111

@@ -9377,8 +9379,6 @@ cd->hwm = cworkspace;
93779379
cd->iscondassert = FALSE;
93789380
cd->start_workspace = cworkspace;
93799381
cd->workspace_size = COMPILE_WORK_SIZE;
9380-
cd->named_groups = named_groups;
9381-
cd->named_group_list_size = NAMED_GROUP_LIST_SIZE;
93829382
cd->start_pattern = (const pcre_uchar *)pattern;
93839383
cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
93849384
cd->req_varyopt = 0;
@@ -9489,6 +9489,7 @@ if (cd->names_found > 0)
94899489
add_name(cd, ng->name, ng->length, ng->number);
94909490
if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
94919491
(PUBL(free))((void *)cd->named_groups);
9492+
cd->named_group_list_size = 0; /* So we don't free it twice */
94929493
}
94939494

94949495
/* Set up a starting, non-extracting bracket, then compile the expression. On
@@ -9639,6 +9640,8 @@ if (errorcode != 0)
96399640
{
96409641
(PUBL(free))(re);
96419642
PCRE_EARLY_ERROR_RETURN:
9643+
if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
9644+
(PUBL(free))((void *)cd->named_groups);
96429645
*erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
96439646
PCRE_EARLY_ERROR_RETURN2:
96449647
*errorptr = find_error_text(errorcode);

deps/pcre/pcre_exec.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
and semantics are as close as possible to those of the Perl 5 language.
77
88
Written by Philip Hazel
9-
Copyright (c) 1997-2018 University of Cambridge
9+
Copyright (c) 1997-2021 University of Cambridge
1010
1111
-----------------------------------------------------------------------------
1212
Redistribution and use in source and binary forms, with or without
@@ -758,7 +758,7 @@ for (;;)
758758
md->mark = NULL; /* In case previously set by assertion */
759759
RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
760760
eptrb, RM55);
761-
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
761+
if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT || rrc == MATCH_KETRPOS) &&
762762
md->mark == NULL) md->mark = ecode + 2;
763763

764764
/* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an

0 commit comments

Comments
 (0)