[Pidgin] #12562: Pidgin IRC does not handle SSL blocks of > IRC_INITIAL_BUFSIZE correctly

Pidgin trac at pidgin.im
Thu Aug 31 01:24:07 EDT 2017


#12562: Pidgin IRC does not handle SSL blocks of > IRC_INITIAL_BUFSIZE correctly
-------------------------------------------------+------------------
 Reporter:  Stmeter                              |       Owner:  elb
     Type:  defect                               |      Status:  new
Milestone:                                       |   Component:  IRC
  Version:  2.7.3                                |  Resolution:
 Keywords:  SSL inspircd packets gnutls openssl  |
-------------------------------------------------+------------------

Comment (by slingamn):

 I think this problem is localized to the IRC implementation after all. For
 example, the Jabber implementation's callback calls `purple_ssl_read` in
 an internal while loop until no more data can be read; only then does it
 return to the main event loop. I did the same thing for the IRC
 implementation (starting from the 2.12 source):

 https://gist.github.com/slingamn/8b852215272a902618fecead52396be4

 and it appears to fix the bug. (Note that the NSS compatibility layer
 translates NSS's `PR_WOULD_BLOCK_ERROR` into `EAGAIN`, which is how the
 loop will exit in the typical case.)

 Thoughts?

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


More information about the Tracker mailing list