8
0

- fix off-by-one error in memory allocation in the punycode encoder

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Net-IDN-Encode?expand=0&rev=15
This commit is contained in:
2014-07-22 14:01:12 +00:00
committed by Git OBS Bridge
parent a02a770f1d
commit 7b313f6d56
3 changed files with 19 additions and 0 deletions

11
encodeoffbyone.diff Normal file
View File

@@ -0,0 +1,11 @@
--- ./lib/Net/IDN/Punycode.xs.orig 2014-07-22 13:54:38.988433322 +0000
+++ ./lib/Net/IDN/Punycode.xs 2014-07-22 13:59:25.217074100 +0000
@@ -138,7 +138,7 @@ encode_punycode(input)
q = delta;
for(k = BASE;; k += BASE) {
- if(re_p >= re_e) {
+ if(re_p + 1 >= re_e) {
length_guess = re_e - re_s + 16;
re_e = SvGROW(RETVAL, length_guess);
re_p = re_e + (re_p - re_s);

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jul 22 16:00:29 CEST 2014 - mls@suse.de
- fix off-by-one error in memory allocation in the punycode encoder
new patch: encodeoffbyone.diff
-------------------------------------------------------------------
Sun Jul 20 07:29:18 UTC 2014 - coolo@suse.com

View File

@@ -25,6 +25,7 @@ License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Net-IDN-Encode/
Source: http://www.cpan.org/authors/id/C/CF/CFAERBER/%{cpan_name}-%{version}.tar.gz
Patch: encodeoffbyone.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
@@ -47,6 +48,7 @@ addresses), using whatever IDNA standard is the best choice at the moment.
%prep
%setup -q -n %{cpan_name}-%{version}
%patch
find . -type f -print0 | xargs -0 chmod 644
%build