]> git.ipfire.org Git - thirdparty/dbus.git/commit
Don't access random memory if data slot isn't allocated yet
authorDan Williams <dcbw@redhat.com>
Thu, 4 Apr 2013 15:49:18 +0000 (10:49 -0500)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Apr 2013 11:45:18 +0000 (12:45 +0100)
commit1495c207b4c76e306a3fe666fffe2b95e0326f3e
treed1cf6caad133c5c56fb8664076aefe9ba5045a63
parentaa8dcc13a6f0e8711940fae247d1b8064104f893
Don't access random memory if data slot isn't allocated yet

If DBUS_DISABLE_ASSERTS was turned on, and a buggy program called
dbus_connection_get_data() with a slot number less than zero (eg,
before even allocating the data slot), random memory would be
accessed and a random value returned.  Anything less than zero
is not a valid slot number and should be rejected by libdbus.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63127
Signed-off-by: Dan Williams <dcbw@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-connection.c