Skip to content

Commit

Permalink
Merge branch 'master' into rsdos-attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
salcock authored Apr 21, 2021
2 parents 372655f + f0b47eb commit d09e30b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/pyavro_stardust/baseavro.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cdef (unsigned int, long) read_long(const unsigned char[:] buf,
const unsigned int maxlen)
cdef parsedString read_string(const unsigned char[:] buf,
const unsigned int maxlen, int addNullTerm=*)

cdef parsedNumericArrayBlock read_numeric_array(const unsigned char[:] buf,
const unsigned int maxlen)

Expand Down
3 changes: 2 additions & 1 deletion src/pyavro_stardust/baseavro.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ from cpython.mem cimport PyMem_Malloc, PyMem_Free, PyMem_Realloc
import zlib, wandio, sys
cimport cython


cdef (unsigned int, long) read_long(const unsigned char[:] buf,
const unsigned int maxlen):
cdef unsigned int longlen = 0
Expand Down Expand Up @@ -33,6 +32,7 @@ cdef (unsigned int, long) read_long(const unsigned char[:] buf,

cdef parsedString read_string(const unsigned char[:] buf,
const unsigned int maxlen, int addNullTerm=True):

cdef unsigned int skip
cdef long strlen
cdef parsedString s
Expand Down Expand Up @@ -193,6 +193,7 @@ cdef class AvroRecord:
if attrind < 0 or <unsigned int>attrind >= self.stringcount:
return 0


astr = read_string(buf, maxlen, True)

if astr.toskip == 0:
Expand Down

0 comments on commit d09e30b

Please sign in to comment.