mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 3 additions and 0 deletions
|
|
@ -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 a new issue