gil pushed to bouncycastle (f22). "fix buffer underflow (rhbz#1218258)"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon May 4 17:55:57 UTC 2015
>From 671367212bc76693684f86594a0c00e80be9f830 Mon Sep 17 00:00:00 2001
From: gil <puntogil at libero.it>
Date: Mon, 4 May 2015 19:55:42 +0200
Subject: fix buffer underflow (rhbz#1218258)
diff --git a/bouncycastle-1.50-buffer-underflow.patch b/bouncycastle-1.50-buffer-underflow.patch
new file mode 100644
index 0000000..a41edda
--- /dev/null
+++ b/bouncycastle-1.50-buffer-underflow.patch
@@ -0,0 +1,24 @@
+--- src/org/bouncycastle/crypto/io/CipherInputStream.java 2013-12-03 12:18:20.000000000 +0100
++++ src/org/bouncycastle/crypto/io/CipherInputStream.java.buffer-underflow 2015-05-04 19:50:21.287410827 +0200
+@@ -46,7 +46,9 @@
+
+ this.bufferedBlockCipher = cipher;
+
+- buf = new byte[cipher.getOutputSize(INPUT_BUF_SIZE)];
++ int outSize = cipher.getOutputSize(INPUT_BUF_SIZE);
++
++ buf = new byte[(outSize > INPUT_BUF_SIZE) ? outSize : INPUT_BUF_SIZE];
+ inBuf = new byte[INPUT_BUF_SIZE];
+ }
+
+@@ -71,7 +73,9 @@
+
+ this.aeadBlockCipher = cipher;
+
+- buf = new byte[cipher.getOutputSize(INPUT_BUF_SIZE)];
++ int outSize = cipher.getOutputSize(INPUT_BUF_SIZE);
++
++ buf = new byte[(outSize > INPUT_BUF_SIZE) ? outSize : INPUT_BUF_SIZE];
+ inBuf = new byte[INPUT_BUF_SIZE];
+ }
+
diff --git a/bouncycastle.spec b/bouncycastle.spec
index b1b08fd..942828c 100644
--- a/bouncycastle.spec
+++ b/bouncycastle.spec
@@ -5,12 +5,14 @@
Summary: Bouncy Castle Crypto Package for Java
Name: bouncycastle
Version: %{ver}
-Release: 6%{?dist}
+Release: 7%{?dist}
License: MIT
URL: http://www.bouncycastle.org
# Use original sources from here on out.
Source0: http://www.bouncycastle.org/download/bcprov-%{archivever}.tar.gz
Source1: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/%{ver}/bcprov-jdk15on-%{ver}.pom
+Patch0: bouncycastle-1.50-buffer-underflow.patch
+
BuildRequires: javapackages-tools
Requires: javapackages-tools
Requires(post): javapackages-tools
@@ -43,6 +45,7 @@ find . -type f -name "*.jar" -exec rm -f {} \;
mkdir src
unzip -qq src.zip -d src/
+%patch0 -p0
%build
pushd src
@@ -153,6 +156,10 @@ fi
%license LICENSE.html
%changelog
+* Mon May 04 2015 gil cattaneo <puntogil at libero.it> 1.50-7
+- fix buffer underflow (rhbz#1218258)
+- fix rpmlint problems
+
* Thu Jan 29 2015 gil cattaneo <puntogil at libero.it> 1.50-6
- introduce license macro
@@ -261,7 +268,7 @@ fi
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.41-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
-* Wed Nov 11 2008 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.41-2
+* Tue Nov 11 2008 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 1.41-2
- Fixed license tag (BSD -> MIT).
- Minor improvements in the SPEC file for better compatibility with the
Fedora Java Packaging Guidelines.
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/bouncycastle.git/commit/?h=f22&id=671367212bc76693684f86594a0c00e80be9f830
More information about the scm-commits
mailing list