summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-25 10:58:50 +0000
committerGitHub <noreply@github.com>2021-10-25 10:58:50 +0000
commitdbe770e3ce2ac2e34ffa8e28b80df57eb0182a68 (patch)
treeb6150971630be9329563a581fdf3857bbbece256 /libpod
parent6618d574b93ed179b5044fa2e283ddeb9b927446 (diff)
parentd7662edf66b703b86d4405c86f3cf7dc2291689e (diff)
downloadpodman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.tar.gz
podman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.tar.bz2
podman-dbe770e3ce2ac2e34ffa8e28b80df57eb0182a68.zip
Merge pull request #12079 from stweil/lgtm
[NO NEW TESTS NEEDED] Fix off-by-one index comparision (reported by LGTM)
Diffstat (limited to 'libpod')
-rw-r--r--libpod/info.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/info.go b/libpod/info.go
index a2fd18491..8d0b19f23 100644
--- a/libpod/info.go
+++ b/libpod/info.go
@@ -332,7 +332,7 @@ func readKernelVersion() (string, error) {
return "", err
}
f := bytes.Fields(buf)
- if len(f) < 2 {
+ if len(f) < 3 {
return string(bytes.TrimSpace(buf)), nil
}
return string(f[2]), nil