summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Kursawe <phosphan@gentoo.org>2011-09-21 19:00:03 +0000
committerPatrick Kursawe <phosphan@gentoo.org>2011-09-21 19:00:03 +0000
commit35df7859fe25adb8cf73e69c0ed34376129bcd06 (patch)
treec04122b9ba194d4c840f6cecf46e1b92d379a0aa /media-gfx
parentFix build with libpng-1.5 (bug #383879). (diff)
downloadgentoo-2-35df7859fe25adb8cf73e69c0ed34376129bcd06.tar.gz
gentoo-2-35df7859fe25adb8cf73e69c0ed34376129bcd06.tar.bz2
gentoo-2-35df7859fe25adb8cf73e69c0ed34376129bcd06.zip
Bug #329047: Patching out some dead code which triggers unnecessary security-related warnings.
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/sane-backends/ChangeLog8
-rw-r--r--media-gfx/sane-backends/files/niash_array_index.patch140
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild4
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild4
4 files changed, 153 insertions, 3 deletions
diff --git a/media-gfx/sane-backends/ChangeLog b/media-gfx/sane-backends/ChangeLog
index b85e1206b650..856ad5a3f3fe 100644
--- a/media-gfx/sane-backends/ChangeLog
+++ b/media-gfx/sane-backends/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/sane-backends
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.187 2011/08/08 17:58:57 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/ChangeLog,v 1.188 2011/09/21 19:00:03 phosphan Exp $
+
+ 21 Sep 2011; Patrick Kursawe <phosphan@gentoo.org>
+ sane-backends-1.0.21-r1.ebuild, sane-backends-1.0.22-r1.ebuild,
+ +files/niash_array_index.patch:
+ Bug #329047: Patching out some dead code which triggers unnecessary
+ security-related warnings.
08 Aug 2011; Bernard Cafarelli <voyageur@gentoo.org>
sane-backends-1.0.18-r6.ebuild, sane-backends-1.0.19-r2.ebuild,
diff --git a/media-gfx/sane-backends/files/niash_array_index.patch b/media-gfx/sane-backends/files/niash_array_index.patch
new file mode 100644
index 000000000000..236c4598b581
--- /dev/null
+++ b/media-gfx/sane-backends/files/niash_array_index.patch
@@ -0,0 +1,140 @@
+--- backend/niash.c 2010-12-02 00:49:58.000000000 +0100
++++ backend/niash.c.new 2011-09-21 20:09:07.000000000 +0200
+@@ -82,14 +82,7 @@
+ optThreshold,
+
+
+- optLast,
+-/* put temporarily disabled options here after optLast */
+-
+- optGroupMisc,
+- optLamp,
+-
+- optCalibrate,
+- optGamma /* analog gamma = single number */
++ optLast
+ } EOptionIndex;
+
+
+@@ -685,17 +678,6 @@
+ pDesc->size = 0;
+ break;
+
+- case optGamma:
+- pDesc->name = SANE_NAME_ANALOG_GAMMA;
+- pDesc->title = SANE_TITLE_ANALOG_GAMMA;
+- pDesc->desc = SANE_DESC_ANALOG_GAMMA;
+- pDesc->type = SANE_TYPE_FIXED;
+- pDesc->constraint_type = SANE_CONSTRAINT_RANGE;
+- pDesc->constraint.range = &rangeGamma;
+- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+- pVal->w = startUpGamma;
+- break;
+-
+ case optGammaTable:
+ pDesc->name = SANE_NAME_GAMMA_VECTOR;
+ pDesc->title = SANE_TITLE_GAMMA_VECTOR;
+@@ -707,31 +689,6 @@
+ pVal->wa = s->aGammaTable;
+ break;
+
+- case optGroupMisc:
+- pDesc->title = SANE_I18N ("Miscellaneous");
+- pDesc->type = SANE_TYPE_GROUP;
+- pDesc->size = 0;
+- break;
+-
+- case optLamp:
+- pDesc->name = "lamp";
+- pDesc->title = SANE_I18N ("Lamp status");
+- pDesc->desc = SANE_I18N ("Switches the lamp on or off.");
+- pDesc->type = SANE_TYPE_BOOL;
+- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+- /* switch the lamp on when starting for first the time */
+- pVal->w = SANE_TRUE;
+- break;
+-
+- case optCalibrate:
+- pDesc->name = "calibrate";
+- pDesc->title = SANE_I18N ("Calibrate");
+- pDesc->desc = SANE_I18N ("Calibrates for black and white level.");
+- pDesc->type = SANE_TYPE_BUTTON;
+- pDesc->cap = SANE_CAP_SOFT_SELECT;
+- pDesc->size = 0;
+- break;
+-
+ case optGroupMode:
+ pDesc->title = SANE_I18N ("Scan Mode");
+ pDesc->desc = "";
+@@ -1007,7 +964,6 @@
+ /* Get options of type SANE_Word */
+ case optCount:
+ case optDPI:
+- case optGamma:
+ case optTLX:
+ case optTLY:
+ case optBRX:
+@@ -1031,17 +987,6 @@
+ strcpy ((char *) pVal, modeList[s->aValues[optMode].w]);
+ break;
+
+- /* Get options of type SANE_Bool */
+- case optLamp:
+- GetLamp (&s->HWParams, &fLampIsOn);
+- *(SANE_Bool *) pVal = fLampIsOn;
+- break;
+-
+- case optCalibrate:
+- /* although this option has nothing to read,
+- it's added here to avoid a warning when running scanimage --help */
+- break;
+-
+ default:
+ DBG (DBG_MSG, "SANE_ACTION_GET_VALUE: Invalid option (%d)\n", n);
+ }
+@@ -1061,7 +1006,6 @@
+ case optCount:
+ return SANE_STATUS_INVAL;
+
+- case optGamma:
+ case optThreshold:
+ case optDPI:
+
+@@ -1089,15 +1033,7 @@
+ DBG (DBG_MSG,
+ "sane_control_option: SANE_ACTION_SET_VALUE %d = %d\n", n,
+ (int) s->aValues[n].w);
+- if (n == optGamma)
+- {
+- if (!fSame && optLast > optGammaTable)
+- {
+- info |= SANE_INFO_RELOAD_OPTIONS;
+- }
+- _SetScalarGamma (s->aGammaTable, s->aValues[n].w);
+- }
+- break;
++ break;
+
+ case optGammaTable:
+ DBG (DBG_MSG, "Writing gamma table\n");
+@@ -1158,20 +1094,6 @@
+ break;
+
+
+-
+- case optLamp:
+- fVal = *(SANE_Bool *) pVal;
+- DBG (DBG_MSG, "lamp %s\n", fVal ? "on" : "off");
+- if (fVal)
+- _WarmUpLamp (s, WARMUP_INSESSION);
+- else
+- SetLamp (&s->HWParams, SANE_FALSE);
+- break;
+-
+- case optCalibrate:
+-/* SimpleCalib(&s->HWParams); */
+- break;
+-
+ default:
+ DBG (DBG_ERR, "SANE_ACTION_SET_VALUE: Invalid option (%d)\n", n);
+ }
diff --git a/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild
index e62e8d3080e7..93883a4f1b3a 100644
--- a/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild,v 1.12 2011/08/08 17:58:57 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.21-r1.ebuild,v 1.13 2011/09/21 19:00:03 phosphan Exp $
EAPI="1"
@@ -163,6 +163,8 @@ src_unpack() {
epatch "${FILESDIR}/xerox-grey.patch"
# Bug #356919
epatch "${FILESDIR}"/${PN}-1.0.22-libv4l-0.8.3.patch
+ # Bug #329047
+ epatch "${FILESDIR}"/niash_array_index.patch
}
src_compile() {
diff --git a/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild
index ac31857fe831..0b80343223f8 100644
--- a/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild,v 1.3 2011/08/08 17:58:57 voyageur Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/sane-backends-1.0.22-r1.ebuild,v 1.4 2011/09/21 19:00:03 phosphan Exp $
EAPI="4"
@@ -152,6 +152,8 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-xerox_mfp-usb.patch
# Bug #356919
epatch "${FILESDIR}"/${P}-libv4l-0.8.3.patch
+ # Bug #329047
+ epatch "${FILESDIR}"/niash_array_index.patch
}
src_configure() {