unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dbusbind.c patch, fixes possible segfault
@ 2008-04-13 14:28 David Hansen
  2008-04-13 16:43 ` Michael Albinus
  0 siblings, 1 reply; 11+ messages in thread
From: David Hansen @ 2008-04-13 14:28 UTC (permalink / raw)
  To: emacs-devel

[-- 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"));
  

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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-13 14:28 dbusbind.c patch, fixes possible segfault David Hansen
@ 2008-04-13 16:43 ` Michael Albinus
  2008-04-13 16:58   ` David Hansen
  2008-04-14  4:04   ` David Hansen
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Albinus @ 2008-04-13 16:43 UTC (permalink / raw)
  To: emacs-devel

David Hansen <david.hansen@gmx.net> writes:

> 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.

Looks OK, I've committed it. Thanks a lot!

Btw, I'm a little bit curious how you've managed it NOT to have a unique
name?

> David

Best regards, Michael.




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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-13 16:43 ` Michael Albinus
@ 2008-04-13 16:58   ` David Hansen
  2008-04-14  4:04   ` David Hansen
  1 sibling, 0 replies; 11+ messages in thread
From: David Hansen @ 2008-04-13 16:58 UTC (permalink / raw)
  To: emacs-devel

On Sun, 13 Apr 2008 18:43:13 +0200 Michael Albinus wrote:

> David Hansen <david.hansen@gmx.net> writes:
>
>> 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.
>
> Looks OK, I've committed it. Thanks a lot!
>
> Btw, I'm a little bit curious how you've managed it NOT to have a unique
> name?

I haven't.  I try to make myself familiar with the low level dbus api
and the emacs code is a nice reading.

David





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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-13 16:43 ` 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
  1 sibling, 2 replies; 11+ messages in thread
From: David Hansen @ 2008-04-14  4:04 UTC (permalink / raw)
  To: emacs-devel


BTW, no need to flag my changes as `tiny' (this one obviously was, the
other one might be questionable), papers are signed.  Wonder what "tiny"
is anyway.

David





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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-14  4:04   ` David Hansen
@ 2008-04-14 17:36     ` Eli Zaretskii
  2008-04-14 18:47     ` Michael Albinus
  1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2008-04-14 17:36 UTC (permalink / raw)
  To: David Hansen; +Cc: emacs-devel

> From: David Hansen <david.hansen@gmx.net>
> Date: Mon, 14 Apr 2008 06:04:47 +0200
> 
> Wonder what "tiny" is anyway.

It indicates that the contributor didn't have papers signed at the
time of the contribution, and that her contribution was found to be
small enough to not require papers.  This is so we could tell, years
later, how come someone's code is in Emacs without paperwork.

If you signed legal papers, your contributions after the papers were
signed should NOT be marked as "tiny".




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

* Re: dbusbind.c patch, fixes possible segfault
  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-14 20:12       ` Stefan Monnier
  1 sibling, 2 replies; 11+ messages in thread
From: Michael Albinus @ 2008-04-14 18:47 UTC (permalink / raw)
  To: emacs-devel

David Hansen <david.hansen@gmx.net> writes:

> BTW, no need to flag my changes as `tiny' (this one obviously was, the
> other one might be questionable), papers are signed.  Wonder what "tiny"
> is anyway.

You're right, you're listed in copyright.list on fencepost. T thought I
did check it when you have contributed your first patch; maybe I've
overlooked your entry.

I've removed the "tiny" flag from your Changelog entries. Eli did
explain it already to you what they stand for; you can read also about
at <http://www.gnu.org/prep/maintain/maintain.html#Legally-Significant>.

Btw, when you have signed the papers, you should have write access to
the Emacs repository, shouldn't you?

> David

Best regards, Michael.




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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-14 18:47     ` Michael Albinus
@ 2008-04-14 18:59       ` David Hansen
  2008-04-15  2:04         ` Glenn Morris
  2008-04-14 20:12       ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: David Hansen @ 2008-04-14 18:59 UTC (permalink / raw)
  To: emacs-devel

On Mon, 14 Apr 2008 20:47:52 +0200 Michael Albinus wrote:

> Btw, when you have signed the papers, you should have write access to
> the Emacs repository, shouldn't you?

No idea how this works, but I think that would be a little bit to much
people with write access.

David





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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-14 18:47     ` Michael Albinus
  2008-04-14 18:59       ` David Hansen
@ 2008-04-14 20:12       ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2008-04-14 20:12 UTC (permalink / raw)
  To: Michael Albinus; +Cc: emacs-devel

> Btw, when you have signed the papers, you should have write access to
> the Emacs repository, shouldn't you?

Not really: signing paperwork only means that your code is
legally acceptable.  But we may decide not to trust you w.r.t quality.
If you do have a fair bit of code already installed in Emacs
(e.g. a package), then as a general rule I'd most likely give out
write-access.


        Stefan




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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-14 18:59       ` David Hansen
@ 2008-04-15  2:04         ` Glenn Morris
  2008-04-15  2:39           ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Glenn Morris @ 2008-04-15  2:04 UTC (permalink / raw)
  To: emacs-devel

David Hansen wrote:

> On Mon, 14 Apr 2008 20:47:52 +0200 Michael Albinus wrote:
>
>> Btw, when you have signed the papers, you should have write access to
>> the Emacs repository, shouldn't you?
>
> No idea how this works, but I think that would be a little bit to much
> people with write access.

Some people with commit access don't have Emacs copyright assignments,
and some others seems to have contributed no, or almost no, code.
It's all a bit odd.




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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-15  2:04         ` Glenn Morris
@ 2008-04-15  2:39           ` Stefan Monnier
  2008-04-15  7:10             ` Glenn Morris
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2008-04-15  2:39 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>>> Btw, when you have signed the papers, you should have write access to
>>> the Emacs repository, shouldn't you?
>> 
>> No idea how this works, but I think that would be a little bit to much
>> people with write access.

> Some people with commit access don't have Emacs copyright assignments,

Sounds like errors.  Unless maybe they only have assignments for part of
the code.  In any case we should try and make sure that such situations
do not happen.  Can you figure out who those people are?


        Stefan




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

* Re: dbusbind.c patch, fixes possible segfault
  2008-04-15  2:39           ` Stefan Monnier
@ 2008-04-15  7:10             ` Glenn Morris
  0 siblings, 0 replies; 11+ messages in thread
From: Glenn Morris @ 2008-04-15  7:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

> Sounds like errors.  Unless maybe they only have assignments for part of
> the code.  In any case we should try and make sure that such situations
> do not happen.  Can you figure out who those people are?

Christopher Stacy
Dhruva Krishnamurthy
Jaeyoun Chung 
Martin Baulig
Rudy Gevaert




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

end of thread, other threads:[~2008-04-15  7:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-13 14:28 dbusbind.c patch, fixes possible segfault David Hansen
2008-04-13 16:43 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).