Skip to content

Commit bbd116b

Browse files
committed
Fix potential segfault in text array decoder.
1 parent a5750ea commit bbd116b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

asyncpg/protocol/codecs/array.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,8 @@ cdef _textarray_decode(ConnectionSettings settings,
639639
indexes[item_level - 1],
640640
item)
641641

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

644645
return result
645646

0 commit comments

Comments
 (0)