mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 11:08:03 +02:00
2003-03-02 Havoc Pennington <hp@pobox.com>
* dbus/dbus-message.c (decode_header_data): fix to always init message_padding, from Benjamin Dauvergne
This commit is contained in:
parent
108f662ad2
commit
7584a7bdcc
2 changed files with 11 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2003-03-02 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* dbus/dbus-message.c (decode_header_data): fix to always init
|
||||
message_padding, from Benjamin Dauvergne
|
||||
|
||||
2003-03-02 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* configure.in: 0.5
|
||||
|
|
|
|||
|
|
@ -2355,6 +2355,8 @@ _dbus_message_loader_unref (DBusMessageLoader *loader)
|
|||
* it can probably always return a buffer size to read exactly
|
||||
* the body of the next message, thus avoiding any memory wastage
|
||||
* or reallocs.
|
||||
*
|
||||
* @todo we need to enforce a max length on strings in header fields.
|
||||
*
|
||||
* @param loader the message loader.
|
||||
* @param buffer the buffer
|
||||
|
|
@ -2399,6 +2401,7 @@ _dbus_message_loader_get_buffer (DBusMessageLoader *loader,
|
|||
#define DBUS_HEADER_FIELD_SENDER_AS_UINT32 \
|
||||
FOUR_CHARS_TO_UINT32 ('s', 'n', 'd', 'r')
|
||||
|
||||
/* FIXME impose max length on name, srvc, sndr */
|
||||
static dbus_bool_t
|
||||
decode_header_data (const DBusString *data,
|
||||
int header_len,
|
||||
|
|
@ -2533,10 +2536,10 @@ decode_header_data (const DBusString *data,
|
|||
_dbus_verbose ("header alignment padding is not nul\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (message_padding)
|
||||
*message_padding = header_len - pos;
|
||||
}
|
||||
|
||||
if (message_padding)
|
||||
*message_padding = header_len - pos;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue