chunker: fix invalid use of types
chunker: fix invalid use of types

With the argument specified as unsigned char *, Cython emits
code in the Python wrapper to convert string-like objects to
unsigned char* (essentially PyBytes_AS_STRING).

Because the len(data) call is performed on a cdef'd string-ish type,
Cython emits a strlen() call, on the result of PyBytes_AS_STRING.

This is not correct, since embedded null bytes are entirely possible.

Incidentally, the code generated by Cython was also not correct,
since the Clang Static Analyzer found a path of execution where
passing arguments in a weird way from Python resulted in strlen(NULL).

Formulated like this, Cython emits essentially:

c_buzhash(
 PyBytes_AS_STRING(data),
 PyObject_Length(data),
 ...
)

which is correct.

edgewood/borg,edgewood/borg,RonnyPfannschmidt/borg,edgewood/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgewood/borg,RonnyPfannschmidt/borg