mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 02:58:01 +02:00
Merge branch 'master' into 'master'
bus/dir-watch:Do not crash when reloading configuration with > 128 dirs Closes #481 See merge request dbus/dbus!453
This commit is contained in:
commit
6c31c381e2
2 changed files with 4 additions and 4 deletions
|
|
@ -131,7 +131,7 @@ _set_watched_dirs_internal (BusContext *context,
|
|||
/* Look for directories in both the old and new sets, if
|
||||
* we find one, move its data into the new set.
|
||||
*/
|
||||
for (i = 0; new_dirs[i]; i++)
|
||||
for (i = 0; i < MAX_DIRS_TO_WATCH && new_dirs[i]; i++)
|
||||
{
|
||||
for (j = 0; j < num_wds; j++)
|
||||
{
|
||||
|
|
@ -160,7 +160,7 @@ _set_watched_dirs_internal (BusContext *context,
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; new_dirs[i]; i++)
|
||||
for (i = 0; i < MAX_DIRS_TO_WATCH && new_dirs[i]; i++)
|
||||
{
|
||||
if (new_wds[i] == -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
|
|||
/* Look for directories in both the old and new sets, if
|
||||
* we find one, move its data into the new set.
|
||||
*/
|
||||
for (i = 0; new_dirs[i]; i++)
|
||||
for (i = 0; i < MAX_DIRS_TO_WATCH && new_dirs[i]; i++)
|
||||
{
|
||||
for (j = 0; j < num_fds; j++)
|
||||
{
|
||||
|
|
@ -264,7 +264,7 @@ bus_set_watched_dirs (BusContext *context, DBusList **directories)
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; new_dirs[i]; i++)
|
||||
for (i = 0; i < MAX_DIRS_TO_WATCH && new_dirs[i]; i++)
|
||||
{
|
||||
if (new_fds[i] == -1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue