]> arthur.barton.de Git - bup.git/commit
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)
commit56242a5c27e2598d68dc9a5293e9bf984b9db808
tree30235af4f6b43b716dfa5d5668dcc86a33cdcf85
parent8e3b1d56c587354d894e12c70afb1d3b4ee891d5
Take additional precautions with the Python/C conversions in _helpers.c.

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>
lib/bup/_helpers.c