summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-string.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-02-26 22:08:19 +0000
committerHavoc Pennington <hp@redhat.com>2003-02-26 22:08:19 +0000
commitb7bc5ba7a323c6a17a442310c40585b67edff5d4 (patch)
tree3b4eb233baebe1fbd642e0d456b6e0d1f60af0d8 /dbus/dbus-string.h
parent8d1eba0f41b2a44a6efefdfab384fccb2c7be4e7 (diff)
2003-02-26 Havoc Pennington <hp@redhat.com>
All kinds of audit fixes from Owen, plus initial attempt to handle unaligned memory returned from malloc. * dbus/dbus-string.c (_dbus_string_init): clamp max length to leave room for align_offset and nul byte (fixup_alignment): function to track an align_offset and ensure real->str is aligned (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated, to allow a nul byte plus align offset (_dbus_string_lock): fix overflow issue (_dbus_string_init_const_len): add assertions on sanity of len, assign allocated to be ALLOCATION_PADDING larger than len (set_length): fixup the overflow handling (_dbus_string_get_data_len): fix overflow in assertion (open_gap): detect overflow in size of gap to be opened (_dbus_string_lengthen): add overflow check (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE (_dbus_string_append): add overflow check (_dbus_string_append_unichar): overflow (_dbus_string_delete): fix overflow in assertion (_dbus_string_copy_len): overflow in assertion (_dbus_string_replace_len): overflows in assertions (_dbus_string_find): change to implement in terms of _dbus_string_find_to (_dbus_string_find_to): assorted fixage (_dbus_string_equal_c_str): assert c_str != NULL, fix logic so the function works (_dbus_string_ends_with_c_str): fix overflow thingy (_dbus_string_base64_encode): overflow fix (_dbus_string_validate_ascii): overflow (_dbus_string_validate_nul): overflow
Diffstat (limited to 'dbus/dbus-string.h')
-rw-r--r--dbus/dbus-string.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h
index 25cdd4dd..1f7d4919 100644
--- a/dbus/dbus-string.h
+++ b/dbus/dbus-string.h
@@ -39,9 +39,10 @@ struct DBusString
int dummy2; /**< placeholder */
int dummy3; /**< placeholder */
int dummy4; /**< placeholder */
- unsigned int dummy5 : 1; /** placeholder */
- unsigned int dummy6 : 1; /** placeholder */
- unsigned int dummy7 : 1; /** placeholder */
+ unsigned int dummy5 : 1; /**< placeholder */
+ unsigned int dummy6 : 1; /**< placeholder */
+ unsigned int dummy7 : 1; /**< placeholder */
+ unsigned int dummy8 : 3; /**< placeholder */
};
dbus_bool_t _dbus_string_init (DBusString *str,