Hello community, here is the log from the commit of package texlive for openSUSE:Factory checked in at 2018-05-01 23:10:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/texlive (Old) and /work/SRC/openSUSE:Factory/.texlive.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "texlive" Tue May 1 23:10:56 2018 rev:48 rq:602075 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/texlive/texlive.changes 2018-04-20 17:25:07.200003743 +0200 +++ /work/SRC/openSUSE:Factory/.texlive.new/texlive.changes 2018-05-01 23:10:59.520080531 +0200 @@ -1,0 +2,5 @@ +Fri Apr 27 00:54:31 UTC 2018 - stefan.bruens@rwth-aachen.de + +- Add patch source-dvipdfm-x.dif to fix XeTeX bug #151 + +------------------------------------------------------------------- New: ---- source-dvipdfm-x.dif ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ texlive.spec ++++++ --- /var/tmp/diff_new_pack.X1wjG6/_old 2018-05-01 23:11:01.388012653 +0200 +++ /var/tmp/diff_new_pack.X1wjG6/_new 2018-05-01 23:11:01.396012363 +0200 @@ -269,6 +269,8 @@ Patch48: http://www.linuxfromscratch.org/patches/blfs/svn/texlive-20170524-source-pop... # PATCH-FIX-UPSTREAM source-poppler-0.59.1.dif -- Adapt to poppler 0.59.1+ API changes Patch49: source-poppler-0.59.1.dif +# PATCH-FIX-SUSE https://sourceforge.net/p/xetex/bugs/151/ -- Fix OOB access when generating alpha mask for 1/2/4-bit indexed PNGs +Patch50: source-dvipdfm-x.dif Prefix: %{_bindir} Provides: pdfjam = %{version} Obsoletes: pdfjam < %{version} @@ -3438,6 +3440,7 @@ %patch48 -p1 -b .poppler59 %patch49 -p0 -b .poppler591 fi +%patch50 -p0 -b .dvipdfm-x # Correct FHS paths paths=$(find -name cnf-to-paths.awk) ++++++ source-dvipdfm-x.dif ++++++ --- texk/dvipdfm-x/pngimage.c_orig 2018-04-27 02:37:38.954103428 +0200 +++ texk/dvipdfm-x/pngimage.c 2018-04-27 02:48:48.121731743 +0200 @@ -966,12 +966,16 @@ png_bytep trans; int num_trans; png_uint_32 i; + png_byte bpc, mask, shift; if (!png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) || !png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, NULL)) { WARN("%s: PNG does not have valid tRNS chunk but tRNS is requested.", PNG_DEBUG_STR); return NULL; } + bpc = png_get_bit_depth(png_ptr, info_ptr); + mask = 0xff >> (8 - bpc); + shift = 8 - bpc; smask = pdf_new_stream(STREAM_COMPRESS); dict = pdf_stream_dict(smask); @@ -983,7 +987,8 @@ pdf_add_dict(dict, pdf_new_name("ColorSpace"), pdf_new_name("DeviceGray")); pdf_add_dict(dict, pdf_new_name("BitsPerComponent"), pdf_new_number(8)); for (i = 0; i < width*height; i++) { - png_byte idx = image_data_ptr[i]; + /* data is packed for 1/2/4 bpc formats, msb first */ + png_byte idx = (image_data_ptr[bpc * i / 8] >> (shift - bpc * i % 8)) & mask; smask_data_ptr[i] = (idx < num_trans) ? trans[idx] : 0xff; } pdf_add_stream(smask, (char *)smask_data_ptr, width*height);