mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 05:18:00 +02:00
Fix syslog string processing
squash_string_nonprintable didn't actually modify the string. Reviewed-By: Colin Walters <walters@verbum.org>
This commit is contained in:
parent
66a09fa7c3
commit
51e0e91115
1 changed files with 5 additions and 5 deletions
|
|
@ -1058,11 +1058,11 @@ string_squash_nonprintable (DBusString *str)
|
|||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
unsigned char c = (unsigned char) buf[i];
|
||||
unsigned char c = (unsigned char) buf[i];
|
||||
if (c == '\0')
|
||||
c = ' ';
|
||||
buf[i] = ' ';
|
||||
else if (c < 0x20 || c > 127)
|
||||
c = '?';
|
||||
buf[i] = '?';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1132,10 +1132,10 @@ _dbus_command_for_pid (unsigned long pid,
|
|||
goto fail;
|
||||
|
||||
string_squash_nonprintable (&cmdline);
|
||||
|
||||
|
||||
if (!_dbus_string_copy (&cmdline, 0, str, _dbus_string_get_length (str)))
|
||||
goto oom;
|
||||
|
||||
|
||||
_dbus_string_free (&cmdline);
|
||||
_dbus_string_free (&path);
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue