зеркало из https://github.com/mozilla/pjs.git
351470: setuid root programs linked with NSPR allow elevation of privilege. r=nelson, sr=wtc
This commit is contained in:
Родитель
aedb529bd0
Коммит
fd00158772
|
@ -277,6 +277,14 @@ void _PR_InitFdCache(void)
|
|||
if (NULL != low) _pr_fd_cache.limit_low = atoi(low);
|
||||
if (NULL != high) _pr_fd_cache.limit_high = atoi(high);
|
||||
|
||||
if (_pr_fd_cache.limit_low < 0)
|
||||
_pr_fd_cache.limit_low = 0;
|
||||
if (_pr_fd_cache.limit_low > FD_SETSIZE)
|
||||
_pr_fd_cache.limit_low = FD_SETSIZE;
|
||||
|
||||
if (_pr_fd_cache.limit_high > FD_SETSIZE)
|
||||
_pr_fd_cache.limit_high = FD_SETSIZE;
|
||||
|
||||
if (_pr_fd_cache.limit_high < _pr_fd_cache.limit_low)
|
||||
_pr_fd_cache.limit_high = _pr_fd_cache.limit_low;
|
||||
|
||||
|
|
|
@ -120,6 +120,8 @@ int index;
|
|||
|
||||
if (num_atomic_locks > MAX_ATOMIC_LOCKS)
|
||||
num_atomic_locks = MAX_ATOMIC_LOCKS;
|
||||
else if (num_atomic_locks < 1)
|
||||
num_atomic_locks = 1;
|
||||
else {
|
||||
num_atomic_locks = PR_FloorLog2(num_atomic_locks);
|
||||
num_atomic_locks = 1L << num_atomic_locks;
|
||||
|
|
Загрузка…
Ссылка в новой задаче