[Bug 27021] crash when calling CreateAccount with a malformed property
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Mar 25 17:33:20 CET 2010
http://bugs.freedesktop.org/show_bug.cgi?id=27021
Simon McVittie <simon.mcvittie at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|patch |
Status Whiteboard| |review-
--- Comment #4 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-03-25 09:33:19 PST ---
Can you reproduce this crash in a regression test by attempting to set a
nonexistent parameter name over D-Bus, for instance?
(To be honest, your stack trace looks as though there's been a missing NUL
termination further down the stack, so you're fixing symptoms rather than
causes. However, if the same symptom can be caused in a valid way, there's no
harm in fixing *that* bug.)
This patch is rather less obvious than it could be... it might well be *valid*,
but I think it'd be considerably clearer if expressed like this:
> refactor the
> function so that cad->ok and cad->error are always set at the same time
Something like this:
cad->ok = TRUE;
if (set_error != NULL)
{
cad->ok = FALSE;
/* moved from [A] */
g_set_error (&cad->error, blah blah blah, set_error->message);
}
if (cad->ok && cad->properties != NULL)
{
cad->ok = ... as before ... (&cad->error);
}
if (cad->ok)
{
... as before ...
}
else
{
/* [A] */
complete_account_creation_finish (account, TRUE, cad);
}
(The comments mentioning [A] wouldn't be committed, obviously.)
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list