all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11442: dbus uses Emacs integer as pointer, possible core dump
@ 2012-05-09 15:20 Paul Eggert
  2012-05-09 15:35 ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2012-05-09 15:20 UTC (permalink / raw
  To: 11442; +Cc: Michael Albinus

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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-05-09 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09 15:20 bug#11442: dbus uses Emacs integer as pointer, possible core dump Paul Eggert
2012-05-09 15:35 ` Michael Albinus
2012-05-09 15:45   ` Andreas Schwab
2012-05-09 21:19     ` Michael Albinus
2012-05-09 21:35       ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.