kopia lustrzana https://gitlab.com/sane-project/backends
Fix strncpy()/strncat() usage in check_for_driver(). From Johannes Meixner at SuSE.
rodzic
b349d9c500
commit
cba7922706
|
@ -1,6 +1,8 @@
|
||||||
2007-10-25 Julien Blache <jb@jblache.org>
|
2007-10-25 Julien Blache <jb@jblache.org>
|
||||||
* sanei/sanei_ab306.c: Fix boundary checking after the for() loop
|
* sanei/sanei_ab306.c: Fix boundary checking after the for() loop
|
||||||
in sanei_ab306_open(). From Johannes Meixner at SuSE.
|
in sanei_ab306_open(). From Johannes Meixner at SuSE.
|
||||||
|
* backend/as6e.c: Fix strncpy()/strncat() usage in
|
||||||
|
check_for_driver(). From Johannes Meixner at SuSE.
|
||||||
|
|
||||||
2007-10-25 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
|
2007-10-25 Pierre Willenbrock <pierre@pirsoft.dnsalias.org>
|
||||||
* backend/genesys_gl841.c: Hopefully removed the remaining hardcoded
|
* backend/genesys_gl841.c: Hopefully removed the remaining hardcoded
|
||||||
|
|
|
@ -811,9 +811,11 @@ check_for_driver (const char *devname)
|
||||||
dir[count - offset] = path[count];
|
dir[count - offset] = path[count];
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
strncpy (fullname, dir, NAMESIZE);
|
/* use sizeof(fullname)-1 to make sure there is at least one padded null byte */
|
||||||
strncat (fullname, "/", NAMESIZE);
|
strncpy (fullname, dir, sizeof(fullname)-1);
|
||||||
strncat (fullname, devname, NAMESIZE);
|
/* take into account that fullname already contains non-null bytes */
|
||||||
|
strncat (fullname, "/", sizeof(fullname)-strlen(fullname)-1);
|
||||||
|
strncat (fullname, devname, sizeof(fullname)-strlen(fullname)-1);
|
||||||
if (!stat (fullname, &statbuf))
|
if (!stat (fullname, &statbuf))
|
||||||
{
|
{
|
||||||
modes = statbuf.st_mode;
|
modes = statbuf.st_mode;
|
||||||
|
|
Ładowanie…
Reference in New Issue