Author nnorwitz
Recipients
Date 2006-08-25.00:52:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=33168

Ugh.  This code is lax in checking/conversion.  Do you think
you could provide a patch?

All of the int cases should call PyInt_AsLong() if this call
fails (returns -1), then that should be returned from
PyMember_SetOne.  If it succeeds, there should be a range
check that ensures the value is valid.  If that fails a
warning should be produced.  We need to issue a warning
rather than an error for backwards compatability (at least
for 2.6).

The float/double cases can be simplified some by calling
PyFloat_AsDouble and doing similar checks as in the int cases.
History
Date User Action Args
2007-08-23 14:42:17adminlinkissue1545696 messages
2007-08-23 14:42:17admincreate