From: David Hansen <david.hansen@gmx.net>
To: emacs-devel@gnu.org
Subject: dbusbind.c patch, fixes possible segfault
Date: Sun, 13 Apr 2008 16:28:46 +0200 [thread overview]
Message-ID: <874pa5ltgh.fsf@localhorst.mine.nu> (raw)
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
This one is similar to the previous dbusbind.c patch. No need to copy
the string and if dbus_bus_get_unique_name () returns NULL strcpy will
segfault.
David
2008-04-13 David Hansen <david.hansen@gmx.net>
* dbusbind.c (dbus-get-unique-name): Remove extra copying of name
string.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 949 bytes --]
*** dbusbind.c.~1.24.~ 2008-04-05 23:46:55.000000000 +0200
--- dbusbind.c 2008-04-13 15:19:27.000000000 +0200
***************
*** 701,707 ****
Lisp_Object bus;
{
DBusConnection *connection;
! char name[DBUS_MAXIMUM_NAME_LENGTH];
/* Check parameters. */
CHECK_SYMBOL (bus);
--- 701,707 ----
Lisp_Object bus;
{
DBusConnection *connection;
! const char *name;
/* Check parameters. */
CHECK_SYMBOL (bus);
***************
*** 710,716 ****
connection = xd_initialize (bus);
/* Request the name. */
! strcpy (name, dbus_bus_get_unique_name (connection));
if (name == NULL)
xsignal1 (Qdbus_error, build_string ("No unique name available"));
--- 710,716 ----
connection = xd_initialize (bus);
/* Request the name. */
! name = dbus_bus_get_unique_name (connection);
if (name == NULL)
xsignal1 (Qdbus_error, build_string ("No unique name available"));
next reply other threads:[~2008-04-13 14:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-13 14:28 David Hansen [this message]
2008-04-13 16:43 ` dbusbind.c patch, fixes possible segfault Michael Albinus
2008-04-13 16:58 ` David Hansen
2008-04-14 4:04 ` David Hansen
2008-04-14 17:36 ` Eli Zaretskii
2008-04-14 18:47 ` Michael Albinus
2008-04-14 18:59 ` David Hansen
2008-04-15 2:04 ` Glenn Morris
2008-04-15 2:39 ` Stefan Monnier
2008-04-15 7:10 ` Glenn Morris
2008-04-14 20:12 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874pa5ltgh.fsf@localhorst.mine.nu \
--to=david.hansen@gmx.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.