[Bug 34796] Implement ContactInfo
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri May 6 20:30:38 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=34796
--- Comment #49 from Debarshi Ray <debarshi.ray at gmail.com> 2011-05-06 11:30:38 PDT ---
(In reply to comment #46)
> Review of attachment 46377 [details]:
>
> ::: src/idle-contact-info.c
> @@ +321,3 @@
> +
> + /* msg == "is connecting from *@<hostname> <IP>" */
> + request = g_queue_peek_head(conn->contact_info_requests);
>
> You need to check that there are actually more than three elements in the
> string. Relying on the server not sending malformed data, and crashing if it
> does, doesn't seem wise.
>
> I think I would check whether the string actually has the expected prefix; if
> it does, strsplit the remainder of the string and put that in the contact info
> field; if it does not, either just include the whole string verbatim or ignore
> it?
I chose to check the prefix. Checking it cleverly will ensure that there are
atleast 3 elements in the string.
Also, as explained in the patch since there is some conflicting (arcane?) use
of 378, I chose to bail out if the prefix does not match. It is not our problem
if daemons make crazy little changes to the protocol here and there.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list