Hello community,
here is the log from the commit of package perl-YAML-LibYAML for
openSUSE:Factory checked in at 2019-09-04 09:02:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-YAML-LibYAML (Old)
and /work/SRC/openSUSE:Factory/.perl-YAML-LibYAML.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-YAML-LibYAML"
Wed Sep 4 09:02:05 2019 rev:18 rq:727224 version:0.80
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-YAML-LibYAML/perl-YAML-LibYAML.changes
2019-06-20 18:53:45.540710898 +0200
+++
/work/SRC/openSUSE:Factory/.perl-YAML-LibYAML.new.7948/perl-YAML-LibYAML.changes
2019-09-04 09:02:07.679048360 +0200
@@ -1,0 +2,14 @@
+Thu Aug 29 10:34:07 CEST 2019 - Tina Mueller <[email protected]>
+
+- Remove perl-YAML-LibYAML-no-plan.patch (not used anymore)
+
+-------------------------------------------------------------------
+Fri Aug 23 05:35:48 UTC 2019 - Stephan Kulow <[email protected]>
+
+- updated to 0.80
+ see /usr/share/doc/packages/perl-YAML-LibYAML/Changes
+
+ 0.80 Thu 22 Aug 2019 01:17:13 PM CEST
+ - Fix memory leak when loading invalid YAML (PR#93 tinita)
+
+-------------------------------------------------------------------
Old:
----
YAML-LibYAML-0.79.tar.gz
perl-YAML-LibYAML-no-plan.patch
New:
----
YAML-LibYAML-0.80.tar.gz
cpanspec.yml
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-YAML-LibYAML.spec ++++++
--- /var/tmp/diff_new_pack.xIPUKq/_old 2019-09-04 09:02:08.459048251 +0200
+++ /var/tmp/diff_new_pack.xIPUKq/_new 2019-09-04 09:02:08.463048251 +0200
@@ -16,18 +16,20 @@
#
-%define cpan_name YAML-LibYAML
Name: perl-YAML-LibYAML
-Version: 0.79
+Version: 0.80
Release: 0
+%define cpan_name YAML-LibYAML
Summary: Perl YAML Serialization using XS and libyaml
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/T/TI/TINITA/%{cpan_name}-%{version}.tar.gz
-Patch0: %{name}-no-plan.patch
+Source1: cpanspec.yml
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(Test::More) >= 0.88
%{perl_requires}
%description
@@ -35,19 +37,14 @@
%prep
%setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
-
-# This patch is only necessary for systems without Test::More >= 0.87_01
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%patch0 -p1
-%endif
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%check
-make %{?_smp_mflags} test
+make test
%install
%perl_make_install
@@ -56,7 +53,7 @@
%files -f %{name}.files
%defattr(-,root,root,755)
+%doc Changes CONTRIBUTING README
%license LICENSE
-%doc Changes README
%changelog
++++++ YAML-LibYAML-0.79.tar.gz -> YAML-LibYAML-0.80.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/Changes
new/YAML-LibYAML-0.80/Changes
--- old/YAML-LibYAML-0.79/Changes 2019-06-11 21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/Changes 2019-08-22 13:17:23.000000000 +0200
@@ -1,3 +1,6 @@
+0.80 Thu 22 Aug 2019 01:17:13 PM CEST
+ - Fix memory leak when loading invalid YAML (PR#93 tinita)
+
0.79 Tue 11 Jun 2019 09:35:22 PM CEST
- Support aliasing scalars resolved as null or booleans (tinita)
- Add YAML::XS::LibYAML::libyaml_version() (tinita)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/LibYAML/perl_libyaml.c
new/YAML-LibYAML-0.80/LibYAML/perl_libyaml.c
--- old/YAML-LibYAML-0.79/LibYAML/perl_libyaml.c 2019-06-11
21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/LibYAML/perl_libyaml.c 2019-08-22
13:17:23.000000000 +0200
@@ -249,6 +249,7 @@
SV *
load_node(perl_yaml_loader_t *loader)
{
+ char *tag;
SV* return_sv = NULL;
/* This uses stack, but avoids (severe!) memory leaks */
yaml_event_t uplevel_event;
@@ -275,7 +276,6 @@
/* The rest all need cleanup */
switch (loader->event.type) {
- char *tag;
/* Handle loading a mapping */
case YAML_MAPPING_START_EVENT:
@@ -332,6 +332,7 @@
SV *
load_mapping(perl_yaml_loader_t *loader, char *tag)
{
+ dXCPT;
SV *key_node;
SV *value_node;
HV *hash = newHV();
@@ -345,37 +346,47 @@
if (anchor)
hv_store(loader->anchors, anchor, strlen(anchor),
SvREFCNT_inc(hash_ref), 0);
- /* Get each key string and value node and put them in the hash */
- while ((key_node = load_node(loader))) {
- assert(SvPOK(key_node));
- value_node = load_node(loader);
- hv_store_ent(
- hash, sv_2mortal(key_node), value_node, 0
- );
- }
+ XCPT_TRY_START {
- /* Deal with possibly blessing the hash if the YAML tag has a class */
- if (tag) {
- if (strEQ(tag, TAG_PERL_PREFIX "hash")) {
- }
- else if (strEQ(tag, YAML_MAP_TAG)) {
+ /* Get each key string and value node and put them in the hash */
+ while ((key_node = load_node(loader))) {
+ assert(SvPOK(key_node));
+ value_node = load_node(loader);
+ hv_store_ent(
+ hash, sv_2mortal(key_node), value_node, 0
+ );
}
- else {
- char *class;
- char *prefix = TAG_PERL_PREFIX "hash:";
- if (*tag == '!') {
- prefix = "!";
+
+ /* Deal with possibly blessing the hash if the YAML tag has a class */
+ if (tag) {
+ if (strEQ(tag, TAG_PERL_PREFIX "hash")) {
}
- else if (strlen(tag) <= strlen(prefix) ||
- ! strnEQ(tag, prefix, strlen(prefix))
- ) croak("%s",
- loader_error_msg(loader, form("bad tag found for hash: '%s'",
tag))
- );
- if (loader->load_blessed) {
- class = tag + strlen(prefix);
- sv_bless(hash_ref, gv_stashpv(class, TRUE));
+ else if (strEQ(tag, YAML_MAP_TAG)) {
+ }
+ else {
+ char *class;
+ char *prefix = TAG_PERL_PREFIX "hash:";
+ if (*tag == '!') {
+ prefix = "!";
+ }
+ else if (strlen(tag) <= strlen(prefix) ||
+ ! strnEQ(tag, prefix, strlen(prefix))
+ ) croak("%s",
+ loader_error_msg(loader, form("bad tag found for hash:
'%s'", tag))
+ );
+ if (loader->load_blessed) {
+ class = tag + strlen(prefix);
+ sv_bless(hash_ref, gv_stashpv(class, TRUE));
+ }
}
}
+
+ } XCPT_TRY_END
+
+ XCPT_CATCH
+ {
+ SvREFCNT_dec(hash_ref);
+ XCPT_RETHROW;
}
return hash_ref;
@@ -385,38 +396,52 @@
SV *
load_sequence(perl_yaml_loader_t *loader)
{
+ dXCPT;
SV *node;
AV *array = newAV();
SV *array_ref = (SV *)newRV_noinc((SV *)array);
char *anchor = (char *)loader->event.data.sequence_start.anchor;
char *tag = (char *)loader->event.data.mapping_start.tag;
- if (anchor)
- hv_store(loader->anchors, anchor, strlen(anchor),
SvREFCNT_inc(array_ref), 0);
- while ((node = load_node(loader))) {
- av_push(array, node);
- }
- if (tag) {
- if (strEQ(tag, TAG_PERL_PREFIX "array")) {
- }
- else if (strEQ(tag, YAML_SEQ_TAG)) {
+
+ XCPT_TRY_START {
+
+ if (anchor)
+ hv_store(loader->anchors, anchor, strlen(anchor),
SvREFCNT_inc(array_ref), 0);
+ while ((node = load_node(loader))) {
+ av_push(array, node);
}
- else {
- char *class;
- char *prefix = TAG_PERL_PREFIX "array:";
- if (*tag == '!')
- prefix = "!";
- else if (strlen(tag) <= strlen(prefix) ||
- ! strnEQ(tag, prefix, strlen(prefix))
- ) croak("%s",
- loader_error_msg(loader, form("bad tag found for array: '%s'",
tag))
- );
- if (loader->load_blessed) {
- class = tag + strlen(prefix);
- sv_bless(array_ref, gv_stashpv(class, TRUE));
+ if (tag) {
+ if (strEQ(tag, TAG_PERL_PREFIX "array")) {
+ }
+ else if (strEQ(tag, YAML_SEQ_TAG)) {
+ }
+ else {
+ char *class;
+ char *prefix = TAG_PERL_PREFIX "array:";
+
+ if (*tag == '!')
+ prefix = "!";
+ else if (strlen(tag) <= strlen(prefix) ||
+ ! strnEQ(tag, prefix, strlen(prefix))
+ ) croak("%s",
+ loader_error_msg(loader, form("bad tag found for array:
'%s'", tag))
+ );
+ if (loader->load_blessed) {
+ class = tag + strlen(prefix);
+ sv_bless(array_ref, gv_stashpv(class, TRUE));
+ }
}
}
+
+ } XCPT_TRY_END
+
+ XCPT_CATCH
+ {
+ SvREFCNT_dec(array_ref);
+ XCPT_RETHROW;
}
+
return array_ref;
}
@@ -1139,7 +1164,7 @@
style = (string_len > 30) ? YAML_LITERAL_SCALAR_STYLE :
YAML_DOUBLE_QUOTED_SCALAR_STYLE;
}
}
- yaml_scalar_event_initialize(
+ if (! yaml_scalar_event_initialize(
&event_scalar,
NULL,
tag,
@@ -1148,7 +1173,9 @@
plain_implicit,
quoted_implicit,
style
- );
+ )) {
+ croak("Could not initialize scalar event\n");
+ }
if (! yaml_emitter_emit(&dumper->emitter, &event_scalar))
croak("%sEmit scalar '%s', error: %s\n",
ERRMSG,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/META.json
new/YAML-LibYAML-0.80/META.json
--- old/YAML-LibYAML-0.79/META.json 2019-06-11 21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/META.json 2019-08-22 13:17:23.000000000 +0200
@@ -55,7 +55,7 @@
"web" : "https://github.com/ingydotnet/yaml-libyaml-pm"
}
},
- "version" : "0.79",
+ "version" : "0.80",
"x_generated_by_perl" : "v5.24.1",
"x_serialization_backend" : "Cpanel::JSON::XS version 4.02"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/META.yml
new/YAML-LibYAML-0.80/META.yml
--- old/YAML-LibYAML-0.79/META.yml 2019-06-11 21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/META.yml 2019-08-22 13:17:23.000000000 +0200
@@ -25,6 +25,6 @@
bugtracker: https://github.com/ingydotnet/yaml-libyaml-pm/issues
homepage: https://github.com/ingydotnet/yaml-libyaml-pm
repository: https://github.com/ingydotnet/yaml-libyaml-pm.git
-version: '0.79'
+version: '0.80'
x_generated_by_perl: v5.24.1
x_serialization_backend: 'YAML::Tiny version 1.73'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/Makefile.PL
new/YAML-LibYAML-0.80/Makefile.PL
--- old/YAML-LibYAML-0.79/Makefile.PL 2019-06-11 21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/Makefile.PL 2019-08-22 13:17:23.000000000 +0200
@@ -20,7 +20,7 @@
"TEST_REQUIRES" => {
"Test::More" => "0.88"
},
- "VERSION" => "0.79",
+ "VERSION" => "0.80",
"test" => {
"TESTS" => "t/*.t"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/README new/YAML-LibYAML-0.80/README
--- old/YAML-LibYAML-0.79/README 2019-06-11 21:35:34.000000000 +0200
+++ new/YAML-LibYAML-0.80/README 2019-08-22 13:17:23.000000000 +0200
@@ -129,6 +129,10 @@
* YAML::Tiny
+ * YAML::PP
+
+ * YAML::PP::LibYAML
+
AUTHOR
Ingy döt Net <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/lib/YAML/LibYAML.pm
new/YAML-LibYAML-0.80/lib/YAML/LibYAML.pm
--- old/YAML-LibYAML-0.79/lib/YAML/LibYAML.pm 2019-06-11 21:35:34.000000000
+0200
+++ new/YAML-LibYAML-0.80/lib/YAML/LibYAML.pm 2019-08-22 13:17:23.000000000
+0200
@@ -1,6 +1,6 @@
use strict; use warnings;
package YAML::LibYAML;
-our $VERSION = '0.79';
+our $VERSION = '0.80';
sub import {
die "YAML::LibYAML has been renamed to YAML::XS. Please use YAML::XS
instead.";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/lib/YAML/XS.pm
new/YAML-LibYAML-0.80/lib/YAML/XS.pm
--- old/YAML-LibYAML-0.79/lib/YAML/XS.pm 2019-06-11 21:35:34.000000000
+0200
+++ new/YAML-LibYAML-0.80/lib/YAML/XS.pm 2019-08-22 13:17:23.000000000
+0200
@@ -1,7 +1,7 @@
use strict; use warnings;
package YAML::XS;
-our $VERSION = '0.79';
+our $VERSION = '0.80';
use base 'Exporter';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/YAML-LibYAML-0.79/lib/YAML/XS.pod
new/YAML-LibYAML-0.80/lib/YAML/XS.pod
--- old/YAML-LibYAML-0.79/lib/YAML/XS.pod 2019-06-11 21:35:34.000000000
+0200
+++ new/YAML-LibYAML-0.80/lib/YAML/XS.pod 2019-08-22 13:17:23.000000000
+0200
@@ -144,6 +144,10 @@
=item * L<YAML::Tiny>
+=item * L<YAML::PP>
+
+=item * L<YAML::PP::LibYAML>
+
=back
=head1 AUTHOR
++++++ cpanspec.yml ++++++
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
#patches:
# foo.patch: -p1
# bar.patch:
#preamble: |-
# BuildRequires: gcc-c++
#post_prep: |-
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
#post_build: |-
# rm unused.files
#post_install: |-
# sed on %{name}.files
#license: SUSE-NonFree
#skip_noarch: 1
#custom_build: |-
#./Build build flags=%{?_smp_mflags} --myflag
#custom_test: |-
#startserver && make test
#ignore_requires: Bizarre::Module