summaryrefslogtreecommitdiff
path: root/debian/patches/niash_c-array-bounds.patch
blob: b7a2114da0c187c8fb88420a8050f0c327c04738 (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: <URL|no|not-needed, useless if you have a Bug field, optional>
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;