mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-07 10:00:19 +01:00
Assert in _dbus_decompose_path if path is NULL or len is wrong
This commit is contained in:
parent
265a3bb04a
commit
d8afa0a10b
1 changed files with 2 additions and 0 deletions
|
|
@ -1080,6 +1080,7 @@ _dbus_decompose_path (const char* data,
|
|||
int i, j, comp;
|
||||
|
||||
_dbus_assert (data != NULL);
|
||||
_dbus_assert (path != NULL);
|
||||
|
||||
#if VERBOSE_DECOMPOSE
|
||||
_dbus_verbose ("Decomposing path \"%s\"\n",
|
||||
|
|
@ -1092,6 +1093,7 @@ _dbus_decompose_path (const char* data,
|
|||
i = 0;
|
||||
while (i < len)
|
||||
{
|
||||
_dbus_assert (data[i] != '\0');
|
||||
if (data[i] == '/')
|
||||
n_components += 1;
|
||||
++i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue