Merge remote-tracking branch 'gitlab/pu/protect-niash-option-access-315132' into niash

merge-requests/1/head
Stéphane Voltz 2015-09-16 18:16:55 +02:00
commit 35d7d39550
1 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -995,6 +995,19 @@ sane_control_option (SANE_Handle h, SANE_Int n, SANE_Action Action,
DBG (DBG_MSG, "sane_control_option: option %d, action %d\n", n, Action);
if ((n < optCount) || (n >= optLast))
{
return SANE_STATUS_UNSUPPORTED;
}
if (Action == SANE_ACTION_GET_VALUE || Action == SANE_ACTION_SET_VALUE)
{
if (pVal == NULL)
{
return SANE_STATUS_INVAL;
}
}
s = (TScanner *) h;
info = 0;