Skip to content

Commit

Permalink
Fix potential segfault in text array decoder.
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed May 11, 2017
1 parent a5750ea commit bbd116b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asyncpg/protocol/codecs/array.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,8 @@ cdef _textarray_decode(ConnectionSettings settings,
indexes[item_level - 1],
item)

indexes[nest_level - 1] += 1
if nest_level > 0:
indexes[nest_level - 1] += 1

return result

Expand Down

0 comments on commit bbd116b

Please sign in to comment.