[Pidgin] #9931: Improper use of Purple::XMLNode:to_str leads to crash of pidgin
Pidgin
trac at pidgin.im
Mon Aug 17 17:46:11 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):
Purple::XMLNode::to_str(); is actually correct (at the moment), it doesn't
take a class as the first argument (though it should). Whereas,
Purple::XMLNode->from_str(); is correct (again at the moment) as it does
take a class as the first argument (though it should not).
Additionally, the third argument to from_str is the length of the string
and as such we shouldn't require perl API users to pass it to us and the
second argument to to_str is an integer pointer into which to return the
length of the string and as such we shouldn't require perl API users to
pass it to us (I'm not even sure they can correctly do so at the moment,
I'd have to check the XS reference again).
In short, these two perl API functions are simply bound incorrectly to
perl (to_str possibly so incorrectly bound as to be flat out broken
currently).
Unfortunately I think it may be too late to get these fixed for 2.6.0
(though I'm going to try), but I will make sure they are fixed for 2.6.1
regardless (I've never considered the perl API subject to the same
stability rules as the C API, especially when the perl API is as broken as
this).
--
Ticket URL: <http://developer.pidgin.im/ticket/9931#comment:7>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list