summaryrefslogtreecommitdiff
path: root/debian/patches/niash_c-array-bounds.patch
blob: 49ada3bbf5cb106c954c0730b7dadd5e60cf9b6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: prevent array bounds in TScanner
Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
Forwarded: http://lists.alioth.debian.org/pipermail/sane-devel/2014-October/032777.html
Last-Update: 2014-10-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: trunk/backend/niash.c
===================================================================
--- trunk.orig/backend/niash.c
+++ trunk/backend/niash.c
@@ -64,6 +64,7 @@
 
 
 /* options enumerator */
+/* on changes please check the typedef struct TScanner */
 typedef enum
 {
   optCount = 0,
@@ -105,8 +106,8 @@ typedef union
 
 typedef struct
 {
-  SANE_Option_Descriptor aOptions[optLast];
-  TOptionValue aValues[optLast];
+  SANE_Option_Descriptor aOptions[optGamma + 1];
+  TOptionValue aValues[optGamma + 1];
 
   TScanParams ScanParams;
   THWParams HWParams;