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:
Sheldon Hearn 2000-02-20 09:08:33 +00:00
parent e903018832
commit 4ca7c740a6

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) {