Fix buffer overrun in pcfclock_read(). The submitter is the original

author of the affected code.

PR:		16552
Submitted by:	Sascha Schumann <sascha@schumann.cx>
Approved by:	jkh
This commit is contained in:
sheldonh 2000-02-20 09:08:33 +00:00
parent 5f7070460d
commit ef661fce32

View File

@ -312,6 +312,9 @@ pcfclock_read(dev_t dev, struct uio *uio, int ioflag)
char buf[18];
int error = 0;
if (uio->uio_resid < 18)
return (ERANGE);
error = pcfclock_read_dev(dev, buf, PCFCLOCK_MAX_RETRIES);
if (error) {