mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Actually use the iterating variable in the for loop when trying to avoid
overflow. Reported by: Vladislav Shabanov vs at rambler-co dot ru MFC after: 1 week Glanced at: alfred
This commit is contained in:
parent
36f45138fb
commit
a4c24c66bc
1 changed files with 1 additions and 1 deletions
|
|
@ -957,7 +957,7 @@ shminit()
|
|||
|
||||
TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
|
||||
for (i = PAGE_SIZE; i > 0; i--) {
|
||||
shminfo.shmmax = shminfo.shmall * PAGE_SIZE;
|
||||
shminfo.shmmax = shminfo.shmall * i;
|
||||
if (shminfo.shmmax >= shminfo.shmall)
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue