bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11442: dbus uses Emacs integer as pointer, possible core dump


From: Paul Eggert
Subject: bug#11442: dbus uses Emacs integer as pointer, possible core dump
Date: Wed, 09 May 2012 08:20:57 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

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.  Shouldn't this be made safe, so
that Lisp code can't do that?  For example, a DbusConnection *
could be made a proper Lisp pseudovector or misc type or
something like that.  The idea is to avoid a bad pointer
leaking into the C code.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]