]> arthur.barton.de Git - bup.git/commitdiff
Take additional precautions with the Python/C conversions in _helpers.c.
authorRob Browning <rlb@defaultvalue.org>
Mon, 18 Feb 2013 19:37:58 +0000 (13:37 -0600)
committerRob Browning <rlb@defaultvalue.org>
Sat, 16 Mar 2013 04:25:16 +0000 (23:25 -0500)
bitmatch(): Use Py_ssize_t for byte, to match the values it's compared
against.  Make sure the result will fit in the Python destination.

bloom_add(): Use "n" for the len conversion since len is Py_ssize_t.

bloom_contains(): Make sure the Python -> C converted values' ranges
are appropriate before using them.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Mark J Hewitt <mjh@idnet.com>

No differences found