mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
libnv: correct the calculation of the structure's size
Reported by: Milosz Kaniewski <milosz.kaniewski@gmail.com>
This commit is contained in:
parent
db11a04828
commit
7f4731ab67
1 changed files with 1 additions and 1 deletions
|
|
@ -1022,7 +1022,7 @@ static bool
|
|||
nvlist_check_header(struct nvlist_header *nvlhdrp)
|
||||
{
|
||||
|
||||
if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(nvlhdrp)) {
|
||||
if (nvlhdrp->nvlh_size > SIZE_MAX - sizeof(*nvlhdrp)) {
|
||||
ERRNO_SET(EINVAL);
|
||||
return (false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue