[Bug 30046] Invalid accounts (missing managers or similar major defects) can cause SEGVs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 6 18:47:21 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=30046

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Status Whiteboard|                            |review-, minor changes

--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-09-06 09:47:21 PDT ---
> +#define FORGET_POINTER(_ptr) g_free (_ptr); _ptr = NULL;

Replacing each call to FORGET_POINTER with tp_clear_pointer (&thing, g_free)
would be better (requires tp-glib 0.11.7).

> +        plausible = (manager != NULL && *manager != '\0' &&
> +                     protocol != NULL && *protocol != '\0');

Two calls to tp_str_empty() would be exactly equivalent and more
human-readable.

> +            g_warning ("%s: account %s has implausible manager/protocol: %s/%s",
> +                       G_STRFUNC, *name, manager, protocol);

This can segfault on platforms whose sprintf can't deal with NULL. We aim to be
portable to non-glibc.

Otherwise, this looks good.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list