rpms/xbmc/devel xbmc-11.0-libpng-1.5-fix-plt-trn-get.patch, NONE, 1.1 xbmc.spec, 1.37, 1.38 xbmc-10-Makefile.patch, 1.1, NONE xbmc-10-bootstrap.patch, 1.1, NONE xbmc-10-dvdread.patch, 1.1, NONE xbmc-10-hdhomerun.patch, 1.2, NONE xbmc-10-python2.7.patch, 1.2, NONE xbmc-10.1-Dharma-335-Python_parse_had_wrong_native_type-0.1.patch, 1.1, NONE xbmc-Dharma-10.1-gcc-4.6-fixes-0.1.patch, 1.1, NONE xbmc-support_newer_libbluray.patch, 1.1, NONE

Alex Lancaster alexlan at rpmfusion.org
Fri Dec 30 20:17:25 CET 2011


Author: alexlan

Update of /cvs/free/rpms/xbmc/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv12175

Modified Files:
	xbmc.spec 
Added Files:
	xbmc-11.0-libpng-1.5-fix-plt-trn-get.patch 
Removed Files:
	xbmc-10-Makefile.patch xbmc-10-bootstrap.patch 
	xbmc-10-dvdread.patch xbmc-10-hdhomerun.patch 
	xbmc-10-python2.7.patch 
	xbmc-10.1-Dharma-335-Python_parse_had_wrong_native_type-0.1.patch 
	xbmc-Dharma-10.1-gcc-4.6-fixes-0.1.patch 
	xbmc-support_newer_libbluray.patch 
Log Message:
Sync with git:
- Add additional patch from http://trac.xbmc.org/ticket/12001 to
  fix uninitialised pointer with libpng 1.5
- Remove upstreamed, or otherwise obsoleted patches 


xbmc-11.0-libpng-1.5-fix-plt-trn-get.patch:
 ximapng.cpp |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

--- NEW FILE xbmc-11.0-libpng-1.5-fix-plt-trn-get.patch ---

Update libpng 1.5 patch: check return values of png_get_PLTE() and
png_get_tRNS() before using the values to avoid using uninitialized values.

--- a/lib/cximage-6.0/CxImage/ximapng.cpp
+++ b/lib/cximage-6.0/CxImage/ximapng.cpp
@@ -178,12 +178,14 @@ bool CxImagePNG::Decode(CxFile *hFile)
 	int _num_palette;
 	png_colorp _palette;
 #if PNG_LIBPNG_VER > 10399
-	png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
+	png_uint_32 _palette_ret;
+	_palette_ret = png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
+	if (_palette_ret && _num_palette>0){
 #else
 	_num_palette=info_ptr->num_palette;
 	_palette=info_ptr->palette;
-#endif
 	if (_num_palette>0){
+#endif
 		SetPalette((rgb_color*)_palette,_num_palette);
 		SetClrImportant(_num_palette);
 	} else if (_bit_depth ==2) { //<DP> needed for 2 bpp grayscale PNGs
@@ -199,11 +201,13 @@ bool CxImagePNG::Decode(CxFile *hFile)
 	int _num_trans;
 	png_color_16p _trans_color;
 #if PNG_LIBPNG_VER > 10399
-	png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
+	png_uint_32 _trans_ret;
+	_trans_ret = png_get_tRNS(png_ptr,info_ptr,&_trans_alpha,&_num_trans,&_trans_color);
+	if (_trans_ret && _num_trans!=0){ //palette transparency
 #else
 	_num_trans=info_ptr->num_trans;
-#endif
 	if (_num_trans!=0){ //palette transparency
+#endif
 		if (_num_trans==1){
 			if (_color_type == PNG_COLOR_TYPE_PALETTE){
 #if PNG_LIBPNG_VER > 10399
@@ -219,7 +223,11 @@ bool CxImagePNG::Decode(CxFile *hFile)
 #endif
 			}
 		}
+#if PNG_LIBPNG_VER > 10399
+		if (_num_trans>1 && _trans_alpha!=NULL){
+#else
 		if (_num_trans>1){
+#endif
 			RGBQUAD* pal=GetPalette();
 			if (pal){
 				DWORD ip;


Index: xbmc.spec
===================================================================
RCS file: /cvs/free/rpms/xbmc/devel/xbmc.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- xbmc.spec	29 Dec 2011 02:33:46 -0000	1.37
+++ xbmc.spec	30 Dec 2011 19:17:24 -0000	1.38
@@ -5,7 +5,7 @@
 
 Name: xbmc
 Version: 11.0
-Release: 0.4.%{PRERELEASE}%{?dist}
+Release: 0.5.%{PRERELEASE}%{?dist}
 URL: http://www.xbmc.org/
 
 Source0: %{name}-%{DIRVERSION}-patched.tar.xz
@@ -36,29 +36,14 @@
 # functionality, needs to be able fallback internal version
 Patch4: xbmc-11.0-hdhomerun.patch
 
-# fix "@#" in Makefile which seem to screw things up no trac filed
-# yet, don't know why this isn't a problem on other Linux systems
-Patch5: xbmc-10-Makefile.patch
-
-# add patch from upstream trac http://trac.xbmc.org/ticket/9584
-# to find Python 2.7 (needed for F-14+)
-Patch6: xbmc-10-python2.7.patch
-
-# patch from upstream to fix builds for GCC 4.6.x
-# (committed to git upstream: http://trac.xbmc.org/ticket/11383)
-Patch7: xbmc-Dharma-10.1-gcc-4.6-fixes-0.1.patch
-
-# upstream patches for newer libbluray support
-# commit 8c1504d0a647271ee48ff83c6eac2cd4b7670df0
-# commit e41dd86046cabe84493453c6588baaf5279710fd
-# commit d17f271d6489cc76494fbc4f3e8017a97d947af4
-Patch8: xbmc-support_newer_libbluray.patch
 
 # libpng 1.5 patch from gentoo
 # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-tv/xbmc/files/xbmc-10.1-libpng-1.5.patch
-Patch9: xbmc-10.1-libpng-1.5.patch
-
-Patch10: xbmc-10.1-Dharma-335-Python_parse_had_wrong_native_type-0.1.patch
+# following two patches both submitted upstream: 
+# http://trac.xbmc.org/ticket/12001
+Patch5: xbmc-10.1-libpng-1.5.patch
+# second libpng 1.5 patch avoids use of uninitialised values
+Patch6: xbmc-11.0-libpng-1.5-fix-plt-trn-get.patch
 
 ExcludeArch: ppc64
 Buildroot: %{_tmppath}/%{name}-%{version}
@@ -209,12 +194,8 @@
 %patch2 -p0
 #patch3 -p0
 %patch4 -p0
-#patch5 -p0
-#patch6 -p0
-#patch7 -p1
-#patch8 -p1
-%patch9 -p2
-#patch10 -p1
+%patch5 -p2
+%patch6 -p1
 
 %build
 
@@ -290,6 +271,11 @@
 %{_includedir}/xbmc/xbmcclient.h
 
 %changelog
+* Fri Dec 30 2011 Alex Lancaster <alexlan[AT]fedoraproject org> - 11.0-0.5.Eden_beta1
+- Add additional patch from http://trac.xbmc.org/ticket/12001 to
+  fix uninitialised pointer with libpng 1.5
+- Remove upstreamed, or otherwise obsoleted patches 
+
 * Thu Dec 29 2011 Alex Lancaster <alexlan[AT] fedoraproject org> - 11.0-0.4.Eden_beta1
 - Enable libpng 1.5 patch, still needed, upstream bug is at: 
   http://trac.xbmc.org/ticket/12001


--- xbmc-10-Makefile.patch DELETED ---


--- xbmc-10-bootstrap.patch DELETED ---


--- xbmc-10-dvdread.patch DELETED ---


--- xbmc-10-hdhomerun.patch DELETED ---


--- xbmc-10-python2.7.patch DELETED ---


--- xbmc-10.1-Dharma-335-Python_parse_had_wrong_native_type-0.1.patch DELETED ---


--- xbmc-Dharma-10.1-gcc-4.6-fixes-0.1.patch DELETED ---


--- xbmc-support_newer_libbluray.patch DELETED ---



More information about the rpmfusion-commits mailing list