fix-buffer-overflow.patch 695 B

12345678910111213141516171819202122232425
  1. --- backend/niash.c.orig 2006-02-04 12:34:28.000000000 +0100
  2. +++ backend/niash.c 2007-02-21 15:38:12.000000000 +0100
  3. @@ -89,7 +89,9 @@ typedef enum
  4. optLamp,
  5. optCalibrate,
  6. - optGamma /* analog gamma = single number */
  7. + optGamma, /* analog gamma = single number */
  8. +/* have optEndOfList only to define arrays with sufficient size */
  9. + optEndOfList
  10. } EOptionIndex;
  11. @@ -105,8 +107,8 @@ typedef union
  12. typedef struct
  13. {
  14. - SANE_Option_Descriptor aOptions[optLast];
  15. - TOptionValue aValues[optLast];
  16. + SANE_Option_Descriptor aOptions[optEndOfList];
  17. + TOptionValue aValues[optEndOfList];
  18. TScanParams ScanParams;
  19. THWParams HWParams;