[arch-commits] Commit in lcms/repos (3 files)
Christian Hesse
eworm at archlinux.org
Mon Jan 29 08:14:48 UTC 2018
Date: Monday, January 29, 2018 @ 08:14:47
Author: eworm
Revision: 315554
archrelease: copy trunk to testing-x86_64
Added:
lcms/repos/testing-x86_64/
lcms/repos/testing-x86_64/PKGBUILD
(from rev 315553, lcms/trunk/PKGBUILD)
lcms/repos/testing-x86_64/cve-2013-4276.patch
(from rev 315553, lcms/trunk/cve-2013-4276.patch)
---------------------+
PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++
cve-2013-4276.patch | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+)
Copied: lcms/repos/testing-x86_64/PKGBUILD (from rev 315553, lcms/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-01-29 08:14:47 UTC (rev 315554)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Tobias Kieslich <neri at archlinux.org>
+# Contributor: Ben <contrasutra at myrealbox.com>
+
+pkgbase=lcms
+pkgname=(lcms python2-lcms)
+pkgver=1.19
+pkgrel=7
+pkgdesc='Lightweight color management development library/engine'
+arch=('x86_64')
+license=('custom')
+depends=('libtiff')
+makedepends=('python2')
+url='http://www.littlecms.com'
+source=("https://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}-${pkgver}.tar.gz"
+ 'cve-2013-4276.patch')
+sha256sums=('80ae32cb9f568af4dc7ee4d3c05a4c31fc513fc3e31730fed0ce7378237273a9'
+ 'cd10cc5ce791ae782b1257e6181a71cbdb685b705779c9ef2ceffc7fb2021bd0')
+
+prepare() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ patch -Np1 -i ../cve-2013-4276.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ ./configure \
+ --prefix=/usr \
+ --with-python
+ make
+ make -C python
+}
+
+package_lcms() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m0644 COPYING \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ rm -rf "${pkgdir}/usr/lib/python2.7/"
+}
+
+package_python2-lcms() {
+ pkgdesc='LittleCMS Python bindings'
+ depends=('lcms')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+ install -D -m0644 COPYING \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ rm -rf "${pkgdir}/usr/"{bin,include,lib/{pkgconfig,liblcms.*},share/man}
+}
Copied: lcms/repos/testing-x86_64/cve-2013-4276.patch (from rev 315553, lcms/trunk/cve-2013-4276.patch)
===================================================================
--- testing-x86_64/cve-2013-4276.patch (rev 0)
+++ testing-x86_64/cve-2013-4276.patch 2018-01-29 08:14:47 UTC (rev 315554)
@@ -0,0 +1,62 @@
+diff -ur lcms-1.19.dfsg/samples/icctrans.c lcms-1.19.dfsg-patched/samples/icctrans.c
+--- lcms-1.19.dfsg/samples/icctrans.c 2009-10-30 15:57:45.000000000 +0000
++++ lcms-1.19.dfsg-patched/samples/icctrans.c 2013-08-06 11:53:14.385266647 +0100
+@@ -86,6 +86,8 @@
+ static LPcmsNAMEDCOLORLIST InputColorant = NULL;
+ static LPcmsNAMEDCOLORLIST OutputColorant = NULL;
+
++unsigned int Buffer_size = 4096;
++
+
+ // isatty replacement
+
+@@ -500,7 +502,7 @@
+
+ Prefix[0] = 0;
+ if (!lTerse)
+- sprintf(Prefix, "%s=", C);
++ snprintf(Prefix, 20, "%s=", C);
+
+ if (InHexa)
+ {
+@@ -648,7 +650,9 @@
+ static
+ void GetLine(char* Buffer)
+ {
+- scanf("%s", Buffer);
++ char User_buffer[Buffer_size];
++ fgets(User_buffer, (Buffer_size - 1), stdin);
++ sscanf(User_buffer,"%s", Buffer);
+
+ if (toupper(Buffer[0]) == 'Q') { // Quit?
+
+@@ -668,7 +672,7 @@
+ static
+ double GetAnswer(const char* Prompt, double Range)
+ {
+- char Buffer[4096];
++ char Buffer[Buffer_size];
+ double val = 0.0;
+
+ if (Range == 0.0) { // Range 0 means double value
+@@ -738,7 +742,7 @@
+ static
+ WORD GetIndex(void)
+ {
+- char Buffer[4096], Name[40], Prefix[40], Suffix[40];
++ char Buffer[Buffer_size], Name[40], Prefix[40], Suffix[40];
+ int index, max;
+
+ max = cmsNamedColorCount(hTrans)-1;
+diff -ur lcms-1.19.dfsg/tifficc/tiffdiff.c lcms-1.19.dfsg-patched/tifficc/tiffdiff.c
+--- lcms-1.19.dfsg/tifficc/tiffdiff.c 2009-10-30 15:57:46.000000000 +0000
++++ lcms-1.19.dfsg-patched/tifficc/tiffdiff.c 2013-08-06 11:49:06.698951157 +0100
+@@ -633,7 +633,7 @@
+ cmsIT8SetSheetType(hIT8, "TIFFDIFF");
+
+
+- sprintf(Buffer, "Differences between %s and %s", TiffName1, TiffName2);
++ snprintf(Buffer, 256, "Differences between %s and %s", TiffName1, TiffName2);
+
+ cmsIT8SetComment(hIT8, Buffer);
+
More information about the arch-commits
mailing list