]> arthur.barton.de Git - bup.git/commit
Check for overflow when converting from Python to unsigned integer types.
authorRob Browning <rlb@defaultvalue.org>
Tue, 3 Dec 2013 18:37:53 +0000 (12:37 -0600)
committerRob Browning <rlb@defaultvalue.org>
Tue, 7 Jan 2014 19:27:48 +0000 (13:27 -0600)
commit117f7c6ad38dd9dab0b665bedef7ef3ce3e40990
treef4dc15d384a2a63e0e74d7dec0d7f69f552aa1b0
parentfa84523b57865a1c4eda1d6bf281a04364cd49db
Check for overflow when converting from Python to unsigned integer types.

Python's PyArg_ParseTuple() unsigned integer type conversions don't
check for overflow, so stop using them.  Add bup_uint_from_py(),
bup_ulong_from_py(), and bup_ullong_from_py() functions that do check,
and use them instead.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c