kopia lustrzana https://gitlab.com/sane-project/backends
* Fixed segmentation fault on invalid option passed to
sane_get_option_descriptor(), sane_control_option() (thanks to Albert Cervera i Areny)merge-requests/1/head
rodzic
249681dbc6
commit
7b4f5d36e8
|
@ -1,3 +1,9 @@
|
|||
2008-06-19 Ilia Sotnikov <hostcc@gmail.com>
|
||||
* backend/hp5590.c:
|
||||
Fixed segmentation fault on invalid option passed to
|
||||
sane_get_option_descriptor(), sane_control_option()
|
||||
(thanks to Albert Cervera i Areny)
|
||||
|
||||
2008-06-19 Ilia Sotnikov <hostcc@gmail.com>
|
||||
* backend/hp5590.c, backend/hp5590_cmds.c, backend/hp5590_cmds.h
|
||||
* backend/hp5590_low.c, backend/hp5590_low.h
|
||||
|
|
|
@ -620,6 +620,9 @@ sane_get_option_descriptor (SANE_Handle handle, SANE_Int option)
|
|||
|
||||
DBG (DBG_proc, "%s, option: %u\n", __FUNCTION__, option);
|
||||
|
||||
if (option >= HP5590_OPT_LAST)
|
||||
return NULL;
|
||||
|
||||
return &scanner->opts[option];
|
||||
}
|
||||
|
||||
|
@ -637,6 +640,9 @@ sane_control_option (SANE_Handle handle, SANE_Int option,
|
|||
if (!handle)
|
||||
return SANE_STATUS_INVAL;
|
||||
|
||||
if (option >= HP5590_OPT_LAST)
|
||||
return SANE_STATUS_INVAL;
|
||||
|
||||
if (action == SANE_ACTION_GET_VALUE)
|
||||
{
|
||||
if (option == HP5590_OPT_NUM)
|
||||
|
|
Ładowanie…
Reference in New Issue