aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/json-iterator/go/iter_array.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-11-07 18:49:19 +0100
committerGitHub <noreply@github.com>2019-11-07 18:49:19 +0100
commit347499778cb1a7045dc831f99b9539bc20fe008d (patch)
treec31cde0f384a912fa950136ddb0797c631c81e90 /vendor/github.com/json-iterator/go/iter_array.go
parent20c8a01af192db69264aa44f46193552206fa427 (diff)
parentd55734e69bcb645802b33ef703d336b89bbeefe1 (diff)
downloadpodman-347499778cb1a7045dc831f99b9539bc20fe008d.tar.gz
podman-347499778cb1a7045dc831f99b9539bc20fe008d.tar.bz2
podman-347499778cb1a7045dc831f99b9539bc20fe008d.zip
Merge pull request #4378 from containers/dependabot/go_modules/github.com/json-iterator/go-1.1.8
Bump github.com/json-iterator/go from 1.1.7 to 1.1.8
Diffstat (limited to 'vendor/github.com/json-iterator/go/iter_array.go')
-rw-r--r--vendor/github.com/json-iterator/go/iter_array.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/json-iterator/go/iter_array.go b/vendor/github.com/json-iterator/go/iter_array.go
index 6188cb457..204fe0e09 100644
--- a/vendor/github.com/json-iterator/go/iter_array.go
+++ b/vendor/github.com/json-iterator/go/iter_array.go
@@ -28,26 +28,32 @@ func (iter *Iterator) ReadArray() (ret bool) {
func (iter *Iterator) ReadArrayCB(callback func(*Iterator) bool) (ret bool) {
c := iter.nextToken()
if c == '[' {
+ if !iter.incrementDepth() {
+ return false
+ }
c = iter.nextToken()
if c != ']' {
iter.unreadByte()
if !callback(iter) {
+ iter.decrementDepth()
return false
}
c = iter.nextToken()
for c == ',' {
if !callback(iter) {
+ iter.decrementDepth()
return false
}
c = iter.nextToken()
}
if c != ']' {
iter.ReportError("ReadArrayCB", "expect ] in the end, but found "+string([]byte{c}))
+ iter.decrementDepth()
return false
}
- return true
+ return iter.decrementDepth()
}
- return true
+ return iter.decrementDepth()
}
if c == 'n' {
iter.skipThreeBytes('u', 'l', 'l')