summaryrefslogtreecommitdiff
path: root/src/_counter.c
diff options
context:
space:
mode:
authorDwayne Litzenberger <dlitz@dlitz.net>2013-02-17 13:02:58 -0800
committerDwayne Litzenberger <dlitz@dlitz.net>2013-02-17 13:03:01 -0800
commitb3b8e04e127b4333f3acf61f7a0fbcc770581db7 (patch)
treecc32269b7dbc8e102376992c8f65094c1a47f4dd /src/_counter.c
parentd715685ae7f5a26ee90a23db5832e4243ce3af45 (diff)
downloadpycrypto-b3b8e04e127b4333f3acf61f7a0fbcc770581db7.tar.gz
Counter: Fix compiler warning about signed-unsigned comparison
Diffstat (limited to 'src/_counter.c')
-rw-r--r--src/_counter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/_counter.c b/src/_counter.c
index a29b0ce..6579a5f 100644
--- a/src/_counter.c
+++ b/src/_counter.c
@@ -106,6 +106,7 @@ CounterObject_init(PCT_CounterObject *self, PyObject *args, PyObject *kwargs)
/* Sanity-check pointers */
assert(self->val <= self->p);
+ assert(self->buf_size >= 0);
assert(self->p + self->nbytes <= self->val + self->buf_size);
assert(self->val + PyBytes_GET_SIZE(self->prefix) == self->p);
assert(PyBytes_GET_SIZE(self->prefix) + self->nbytes + PyBytes_GET_SIZE(self->suffix) == self->buf_size);