mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-16 13:08:06 +02:00
Revert "reader_init: Initialize all fields of struct DBusTypeReader (CID 54754, 54772, 54773)."
This reverts commit 21a7873f20.
This appears to cause a segfault, presumably resulting from something
assuming that reader_init() would not reinitialize all fields:
#0 0x00007ffff7b74777 in _dbus_type_reader_get_current_type (reader=reader@entry=0x7fffffffda50) at .../dbus/dbus-marshal-recursive.c:791
#1 0x00007ffff7b719d0 in _dbus_header_cache_check (header=<optimized out>)
at .../dbus/dbus-marshal-header.c:209
#2 0x00007ffff7b719d0 in _dbus_header_cache_check (header=header@entry=0x624658, field=field@entry=6) at .../dbus/dbus-marshal-header.c:250
#3 0x00007ffff7b72884 in _dbus_header_get_field_basic (header=header@entry=0x624658, field=field@entry=6, type=type@entry=115, value=value@entry=0x7fffffffdbd8) at .../dbus/dbus-marshal-header.c:1365
#4 0x00007ffff7b7d8c2 in dbus_message_get_destination (message=message@entry=0x624650) at .../dbus/dbus-message.c:3457
#5 0x00007ffff7b67be6 in _dbus_connection_send_preallocated_unlocked_no_update (connection=connection@entry=0x6236d0, preallocated=0x0,
preallocated@entry=0x6234c0, message=message@entry=0x624650, client_serial=client_serial@entry=0x7fffffffdcbc)
at .../dbus/dbus-connection.c:2017
This commit is contained in:
parent
21a7873f20
commit
480f0182fa
1 changed files with 4 additions and 5 deletions
|
|
@ -149,7 +149,6 @@ reader_init (DBusTypeReader *reader,
|
|||
const DBusString *value_str,
|
||||
int value_pos)
|
||||
{
|
||||
_DBUS_ZERO (*reader);
|
||||
reader->byte_order = byte_order;
|
||||
reader->finished = FALSE;
|
||||
reader->type_str = type_str;
|
||||
|
|
@ -737,11 +736,11 @@ _dbus_type_reader_init (DBusTypeReader *reader,
|
|||
const DBusString *value_str,
|
||||
int value_pos)
|
||||
{
|
||||
reader->klass = &body_reader_class;
|
||||
|
||||
reader_init (reader, byte_order, type_str, type_pos,
|
||||
value_str, value_pos);
|
||||
|
||||
reader->klass = &body_reader_class;
|
||||
|
||||
#if RECURSIVE_MARSHAL_READ_TRACE
|
||||
_dbus_verbose (" type reader %p init type_pos = %d value_pos = %d remaining sig '%s'\n",
|
||||
reader, reader->type_pos, reader->value_pos,
|
||||
|
|
@ -762,11 +761,11 @@ _dbus_type_reader_init_types_only (DBusTypeReader *reader,
|
|||
const DBusString *type_str,
|
||||
int type_pos)
|
||||
{
|
||||
reader->klass = &body_types_only_reader_class;
|
||||
|
||||
reader_init (reader, DBUS_COMPILER_BYTE_ORDER /* irrelevant */,
|
||||
type_str, type_pos, NULL, _DBUS_INT_MAX /* crashes if we screw up */);
|
||||
|
||||
reader->klass = &body_types_only_reader_class;
|
||||
|
||||
#if RECURSIVE_MARSHAL_READ_TRACE
|
||||
_dbus_verbose (" type reader %p init types only type_pos = %d remaining sig '%s'\n",
|
||||
reader, reader->type_pos,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue