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:
parent
e903018832
commit
4ca7c740a6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user