components/perl512/patches/CVE-2011-2728.patch
branchs11-update
changeset 2528 788328aeec2a
parent 2527 0935492f14d7
child 2529 2d830e3fcca4
--- a/components/perl512/patches/CVE-2011-2728.patch	Fri Mar 22 10:28:14 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-#
-# CVE-2011-2728
-# http://perl5.git.perl.org/perl.git/commit/1af4051e077438976a4c12a0622feaf6715bec77
-# https://bugzilla.redhat.com/show_bug.cgi?id=742236
-#
-diff -urN perl-5.12.3/ext/File-Glob/Glob.xs p/ext/File-Glob/Glob.xs
---- perl-5.12.3/ext/File-Glob/Glob.xs   2011-01-09 12:20:55.000000000 -0800
-+++ perl-5.12.3/ext/File-Glob/Glob.xs     2011-11-28 00:46:10.593556922 -0800
-@@ -1,6 +1,7 @@
- #include "EXTERN.h"
- #include "perl.h"
- #include "XSUB.h"
-+#include "strings.h"
- 
- #include "bsd_glob.h"
- 
-@@ -49,9 +50,12 @@
- 	/* allow for optional flags argument */
- 	if (items > 1) {
- 	    flags = (int) SvIV(ST(1));
-+	    /* remove unsupported flags */
-+	    flags &= ~(GLOB_APPEND | GLOB_DOOFFS | GLOB_ALTDIRFUNC | GLOB_MAGCHAR);
- 	}
- 
- 	/* call glob */
-+	bzero(&pglob, sizeof(glob_t));
- 	retval = bsd_glob(pattern, flags, errfunc, &pglob);
- 	GLOB_ERROR = retval;
- 
---- perl-5.12.3/ext/File-Glob/t/basic.t.orig  út lis 15 13:22:27 2011
-+++ perl-5.12.3/ext/File-Glob/t/basic.t       út lis 15 13:22:54 2011
-@@ -15,7 +15,7 @@
-     }
- }
- use strict;
--use Test::More tests => 14;
-+use Test::More tests => 15;
- BEGIN {use_ok('File::Glob', ':glob')};
- use Cwd ();
-
-@@ -195,3 +195,7 @@
-     local $TODO = "home-made glob doesn't do regexes" if $^O eq 'VMS';
-     is_deeply(\@glob_files, ['a_dej']);
- }
-+
-+# This used to segfault.
-+my $i = bsd_glob('*', GLOB_ALTDIRFUNC);
-+is(&File::Glob::GLOB_ERROR, 0, "Successfuly ignored unsupported flag");