Close serialization file in pcre2test after any error
This commit is contained in:
parent
8e2f117e16
commit
9c421654ce
@ -0,0 +1,51 @@
|
|||||||
|
From 23f3fd65eb57bdaa03701177bbd2043a08a3299e Mon Sep 17 00:00:00 2001
|
||||||
|
From: ph10 <ph10@6239d852-aaf2-0410-a92c-79f79f948069>
|
||||||
|
Date: Tue, 21 Mar 2017 16:18:54 +0000
|
||||||
|
Subject: [PATCH] Close serialization file in pcre2test after any error.
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@692 6239d852-aaf2-0410-a92c-79f79f948069
|
||||||
|
|
||||||
|
Petr Písař: Ported to 10.32.
|
||||||
|
|
||||||
|
diff --git a/src/pcre2test.c b/src/pcre2test.c
|
||||||
|
index 39eedbe..b6d3ec9 100644
|
||||||
|
--- a/src/pcre2test.c
|
||||||
|
+++ b/src/pcre2test.c
|
||||||
|
@@ -4456,6 +4456,7 @@ switch(cmd)
|
||||||
|
if (rc < 0)
|
||||||
|
{
|
||||||
|
serial_error(rc, "Serialization");
|
||||||
|
+ fclose(f);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4469,6 +4470,7 @@ switch(cmd)
|
||||||
|
if (fwrite(serial, 1, serial_size, f) != serial_size)
|
||||||
|
{
|
||||||
|
fprintf(outfile, "** Wrong return from fwrite()\n");
|
||||||
|
+ fclose(f);
|
||||||
|
return PR_ABEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4496,6 +4498,7 @@ switch(cmd)
|
||||||
|
{
|
||||||
|
fprintf(outfile, "** Failed to get memory (size %lu) for #load\n",
|
||||||
|
(unsigned long int)serial_size);
|
||||||
|
+ fclose(f);
|
||||||
|
return PR_ABEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4503,6 +4506,7 @@ switch(cmd)
|
||||||
|
{
|
||||||
|
fprintf(outfile, "** Wrong return from fread()\n");
|
||||||
|
free(serial);
|
||||||
|
+ fclose(f);
|
||||||
|
return PR_ABEND;
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
--
|
||||||
|
2.7.4
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
#%%global rcversion RC1
|
#%%global rcversion RC1
|
||||||
Name: pcre2
|
Name: pcre2
|
||||||
Version: 10.23
|
Version: 10.23
|
||||||
Release: %{?rcversion:0.}3%{?rcversion:.%rcversion}%{?dist}
|
Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist}
|
||||||
%global myversion %{version}%{?rcversion:-%rcversion}
|
%global myversion %{version}%{?rcversion:-%rcversion}
|
||||||
Summary: Perl-compatible regular expression library
|
Summary: Perl-compatible regular expression library
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -48,6 +48,9 @@ Patch3: pcre2-10.23-Fix-crash-for-forward-reference-in-lookbehind-with-P.pat
|
|||||||
# Fix a pcre2test bug for global match with zero terminated subject,
|
# Fix a pcre2test bug for global match with zero terminated subject,
|
||||||
# upstream bug #2063, in upstream after 10.23
|
# upstream bug #2063, in upstream after 10.23
|
||||||
Patch4: pcre2-10.23-Fix-pcre2test-bug-for-global-match-with-zero-termina.patch
|
Patch4: pcre2-10.23-Fix-pcre2test-bug-for-global-match-with-zero-termina.patch
|
||||||
|
# Close serialization file in pcre2test after any error, upstream bug #2074,
|
||||||
|
# in upstream after 10.23
|
||||||
|
Patch5: pcre2-10.23-Close-serialization-file-in-pcre2test-after-any-erro.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: coreutils
|
BuildRequires: coreutils
|
||||||
@ -128,6 +131,7 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test.
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
# Because of multilib patch
|
# Because of multilib patch
|
||||||
libtoolize --copy --force
|
libtoolize --copy --force
|
||||||
autoreconf -vif
|
autoreconf -vif
|
||||||
@ -226,6 +230,9 @@ make %{?_smp_mflags} check VERBOSE=yes
|
|||||||
%{_mandir}/man1/pcre2test.*
|
%{_mandir}/man1/pcre2test.*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 22 2017 Petr Pisar <ppisar@redhat.com> - 10.23-4
|
||||||
|
- Close serialization file in pcre2test after any error (upstream bug #2074)
|
||||||
|
|
||||||
* Mon Mar 20 2017 Petr Pisar <ppisar@redhat.com> - 10.23-3
|
* Mon Mar 20 2017 Petr Pisar <ppisar@redhat.com> - 10.23-3
|
||||||
- Fix an internal error for a forward reference in a lookbehind with
|
- Fix an internal error for a forward reference in a lookbehind with
|
||||||
PCRE2_ANCHORED (oss-fuzz bug #865)
|
PCRE2_ANCHORED (oss-fuzz bug #865)
|
||||||
|
Loading…
Reference in New Issue
Block a user