perl-YAML-LibYAML/YAML-LibYAML-0.35-format-error.patch
Paul Howarth 2d5a8241a0 Clean up and add patch for CVE-2012-1152 (CPAN RT#46507)
- Fix various format string vulnerabilities (CVE-2012-1152, CPAN RT#46507)
- De-duplicate buildreqs, with Module>Install>Tests priority
- Install to vendor directories
- Don't need to remove empty directories from buildroot
- Don't use macros for commands
- Make %files list more explicit
- Tidy %description
2012-03-29 18:56:28 +01:00

40 lines
1.4 KiB
Diff

diff -urbaN YAML-LibYAML-0.35-orig//LibYAML/perl_libyaml.c YAML-LibYAML-0.35/LibYAML/perl_libyaml.c
--- YAML-LibYAML-0.35-orig//LibYAML/perl_libyaml.c 2011-04-03 18:28:08.000000000 +0200
+++ YAML-LibYAML-0.35/LibYAML/perl_libyaml.c 2011-04-08 09:25:49.633009787 +0200
@@ -188,7 +188,7 @@
return;
load_error:
- croak(loader_error_msg(&loader, NULL));
+ croak("%s", loader_error_msg(&loader, NULL));
}
/*
@@ -271,7 +271,7 @@
return return_sv;
load_error:
- croak(loader_error_msg(loader, NULL));
+ croak("%s", loader_error_msg(loader, NULL));
}
/*
@@ -314,7 +314,7 @@
else if (strlen(tag) <= strlen(prefix) ||
! strnEQ(tag, prefix, strlen(prefix))
) croak(
- loader_error_msg(loader, form("bad tag found for hash: '%s'", tag))
+ "%s", loader_error_msg(loader, form("bad tag found for hash: '%s'", tag))
);
class = tag + strlen(prefix);
sv_bless(hash_ref, gv_stashpv(class, TRUE));
@@ -347,7 +347,7 @@
else if (strlen(tag) <= strlen(prefix) ||
! strnEQ(tag, prefix, strlen(prefix))
) croak(
- loader_error_msg(loader, form("bad tag found for array: '%s'", tag))
+ "%s", loader_error_msg(loader, form("bad tag found for array: '%s'", tag))
);
class = tag + strlen(prefix);
sv_bless(array_ref, gv_stashpv(class, TRUE));