[Pidgin] #17375: "Segmentation Fault" on IRC server reply

Pidgin trac at pidgin.im
Wed Jan 16 09:00:46 EST 2019


#17375: "Segmentation Fault" on IRC server reply
---------------------+------------------
 Reporter:  villain  |       Owner:  elb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  IRC
  Version:  2.12.0   |  Resolution:
 Keywords:           |
---------------------+------------------

Comment (by elb):

 Can you test this patch?

 {{{
 diff -r 0489ab8d3802 libpurple/protocols/irc/msgs.c
 --- a/libpurple/protocols/irc/msgs.c    Tue Nov 20 23:45:25 2018 -0600
 +++ b/libpurple/protocols/irc/msgs.c    Wed Jan 16 08:57:54 2019 -0500
 @@ -71,7 +71,13 @@

  static char *irc_mask_userhost(const char *mask)
  {
 -       return g_strdup(strchr(mask, '!') + 1);
 +       char *bang = strchr(mask, '!');
 +
 +       if (!bang) {
 +               return NULL;
 +       } else {
 +               return g_strdup(bang + 1);
 +       }
  }

  static void irc_chat_remove_buddy(PurpleConversation *convo, char
 *data[2])
 }}}

--
Ticket URL: <https://developer.pidgin.im/ticket/17375#comment:1>
Pidgin <https://pidgin.im>
Pidgin


More information about the Tracker mailing list