[openpts] Fixed passing of incorrect file descriptor to zlip APIs

avesh avesh at fedoraproject.org
Mon Jul 23 21:36:20 UTC 2012


commit fb8985167940e69f9ad383f2d9f944c359f27d9d
Author: Avesh Agarwal <avagarwa at redhat.com>
Date:   Mon Jul 23 17:36:17 2012 -0400

    Fixed passing of incorrect file descriptor to zlip APIs

 openpts-zlib-fixes.patch |   21 +++++++++++++++++++++
 openpts.spec             |    7 ++++++-
 2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/openpts-zlib-fixes.patch b/openpts-zlib-fixes.patch
new file mode 100644
index 0000000..6ecee58
--- /dev/null
+++ b/openpts-zlib-fixes.patch
@@ -0,0 +1,21 @@
+diff -urNp openpts-0.2.6-patched/src/tboot2iml.c openpts-0.2.6-current/src/tboot2iml.c
+--- openpts-0.2.6-patched/src/tboot2iml.c	2012-07-23 16:30:12.381361421 -0400
++++ openpts-0.2.6-current/src/tboot2iml.c	2012-07-23 17:25:59.053945778 -0400
+@@ -531,7 +531,7 @@ int sinit_acm_hash(char *filename, int s
+ 
+ 
+ int sha1sum_unzip(char *filename, int *filesize, BYTE *digest) {
+-    FILE *fp;
++    gzFile fp;
+     char buf[2048];
+     SHA_CTX sha_ctx;
+     int len;
+@@ -541,7 +541,7 @@ int sha1sum_unzip(char *filename, int *f
+ 
+     /* open */
+     fp = gzopen(filename, "rb");
+-    if (fp == NULL) {
++    if (fp == Z_NULL) {
+         LOG(LOG_ERR, "File %s does not exist\n", filename);
+         return 0;
+     }
diff --git a/openpts.spec b/openpts.spec
index 11a14e4..5b2ecc6 100644
--- a/openpts.spec
+++ b/openpts.spec
@@ -5,7 +5,7 @@ Summary: TCG Platform Trust Service (PTS)
 Name: openpts
 Version: 0.2.6
 
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: CPL
 Url: http://sourceforge.jp/projects/openpts/
 Source0: http://sourceforge.jp/projects/openpts/downloads/54410/openpts-%{version}.tar.gz
@@ -34,6 +34,7 @@ Patch1: bugs.patch
 # To resolve inconsistency in its file name in /var/lock/subsys/
 Patch2: init-script.patch
 Patch3: openpts-zlib.patch
+Patch4: openpts-zlib-fixes.patch
 
 %description
 OpenPTS is an open-source package of Platform Trust Service (PTS)
@@ -46,6 +47,7 @@ specifications set forth by the Trusted Computing Group (TCG).
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 sh bootstrap.sh
@@ -154,6 +156,9 @@ getent group ptsc >/dev/null || groupadd -r ptsc
 #fi
 
 %changelog
+* Mon Jul 23 2012 Avesh Agarwal <avagarwa at redhat.com> - 0.2.6-4
+- Fixed passing of incorrect file descriptor to zlip APIs
+
 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.6-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list