[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11442: dbus uses Emacs integer as pointer, possible core dump
From: |
Andreas Schwab |
Subject: |
bug#11442: dbus uses Emacs integer as pointer, possible core dump |
Date: |
Wed, 09 May 2012 17:45:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux) |
Michael Albinus <michael.albinus@gmx.de> writes:
> Paul Eggert <eggert@cs.ucla.edu> writes:
>
> Hi Paul,
>
>> The trunk version of Emacs src/dbusbind.c contains a function
>> xd_get_connection_address that does this:
>>
>> connection = (DBusConnection *) (intptr_t) XFASTINT (val);
>>
>> This converts an Emacs integer to a pointer without checking
>> that it is actually of the proper C type. It is possible
>> for Lisp code to mistakenly put an integer there that will
>> cause Emacs to dump core.
>
> In general, I agree with you. In the given case, it is just a pointer
> address which has been written in Fdbus_init_bus. No other place is
> expected to write such an address, but since it is a Lisp object,
> somebody could do by mistake.
Why is Vdbus_registered_buses exported to lisp?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."