[Pidgin] #17246: libpurrple crash with fsrawconference

Pidgin trac at pidgin.im
Fri Sep 15 14:44:29 EDT 2017


#17246: libpurrple crash with fsrawconference
--------------------+--------------------------
 Reporter:  dwmw2   |      Owner:  EionRobb
     Type:  defect  |     Status:  new
Milestone:  2.12.1  |  Component:  unclassified
  Version:  2.12.0  |   Keywords:
--------------------+--------------------------
 I can live with the fact that the PurpleMedia interface is really just
 Farstream in a very unconvincing disguise — good luck ever implementing it
 using anything *other* than Farstream as the back end.

 However, it also seems to be making assumptions that are only met by
 fsrtpconference, not fsrawconference. That's less good.

 I have a PRPL where I receive audio data over the native data stream
 (websocket or DTLS), multiplexed with other stuff. I basically have audio
 bytes which I need to feed into libpurple somehow — and that "somehow"
 presumably needs to be by using fsrawconference. I tried doing it like
 this:
 {{{
    media = purple_media_manager_create_media(purple_media_manager_get(),
                                              account, "fsrawconference",
                                              name, FALSE);
    purple_media_add_stream(media, "foo", name, PURPLE_MEDIA_AUDIO,
                            FALSE, "bar", 0, NULL);
 }}}

 However, that crashes because we assume that all FsCandidate objects have
 a "cname" property, which isn't true of FsRawCandidate. So we end up
 attempting to compare an uninitialised "name" variable in
 gst_handle_message_element():
 {{{
 (11:41:25) backend-fs2: got new local candidate: 12
 (11:41:25) GLib-GObject: g_object_get_valist: object class
 'FsRawParticipant' has no property named 'cname'

 Thread 1 "pidgin.orig" received signal SIGSEGV, Segmentation fault.
 gst_handle_message_element (bus=<optimised out>, self=0x1018dfe20
 [PurpleMediaBackendFs2], msg=<optimised out>) at /build/pidgin-
 dzk2Cb/pidgin-2.10.12/./libpurple/media/backend-fs2.c:1157
 1157    /build/pidgin-dzk2Cb/pidgin-2.10.12/./libpurple/media/backend-
 fs2.c: No such file or directory.
 }}}

--
Ticket URL: <https://developer.pidgin.im/ticket/17246>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list