mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 18:08:01 +02:00
tools: fix begin check index and access by array
This excludes accessing to array by non-valid index.
This commit is contained in:
parent
8c1e83deaa
commit
7095e15097
1 changed files with 2 additions and 2 deletions
|
|
@ -134,8 +134,8 @@ print_ay (DBusMessageIter *iter, int depth)
|
|||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
if ((bytes[i] < 32 || bytes[i] > 126) &&
|
||||
(i < len - 1 || bytes[i] != '\0'))
|
||||
if ((i < len - 1 || bytes[i] != '\0') &&
|
||||
(bytes[i] < 32 || bytes[i] > 126))
|
||||
{
|
||||
all_ascii = FALSE;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue