[Pidgin] #9931: Improper use of Purple::XMLNode:to_str leads to crash of pidgin

Pidgin trac at pidgin.im
Mon Aug 17 18:06:28 EDT 2009


#9931: Improper use of Purple::XMLNode:to_str leads to crash of pidgin
--------------------+-------------------------------------------------------
 Reporter:  mcepl   |        Owner:  deryni   
     Type:  defect  |       Status:  new      
Milestone:          |    Component:  libpurple
  Version:          |   Resolution:           
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by deryni):

 The perl API is supposed to be a direct mapping of the C API except where
 it can be more helpfully expressed in a perl-ish manner. So, generally, it
 shouldn't require explicit lengths for strings, should work in an OO
 manner, etc.

 Much of this is simple to understand, some of it is not. As much of it as
 is possible should be made to be as simple as possible. Notably, had this
 worked the way I think it should work the lines would be 'my $packet =
 Purple::XMLNode::from_str($packetstr);' and 'my $packetstr =
 $packet->to_str();' both of which should be (once the "no need for
 explicit string lengths" bit was understood) the obvious choice.

 A short document explaining the default mapping (like exists for DBus,
 though that may just be a sentence or two somewhere) would likely be a
 good idea, but beyond that specific function-by-function documentation is
 a much larger task.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/9931#comment:9>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list