Fix boundary checking after the for() loop in sanei_ab306_open(). From Johannes Meixner at SuSE.

merge-requests/1/head
Julien BLACHE 2007-10-25 13:23:52 +00:00
rodzic 7459dfe035
commit b349d9c500
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -1,10 +1,12 @@
2007-10-25 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
2007-10-25 Julien Blache <jb@jblache.org>
* sanei/sanei_ab306.c: Fix boundary checking after the for() loop
in sanei_ab306_open(). From Johannes Meixner at SuSE.
2007-10-25 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
* backend/genesys_gl841.c: Hopefully removed the remaining hardcoded
sizeof(Genesys_Register_Set)
2007-10-25 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
* backend/genesys_gl841.c: One more instance of
sizeof(Genesys_Register_Set) vs 2
* backend/genesys.c: Add check for small register set in

Wyświetl plik

@ -273,7 +273,7 @@ sanei_ab306_open (const char *dev, int *fdp)
if (port[i].base == base)
break;
if (port[i].base != base)
if (i >= NELEMS(port))
{
DBG(1, "sanei_ab306_open: %lx is not a valid base address\n", base);
return SANE_STATUS_INVAL;