mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-09 00:57:53 +00:00
Merge pull request #12079 from stweil/lgtm
[NO NEW TESTS NEEDED] Fix off-by-one index comparision (reported by LGTM)
This commit is contained in:
commit
dbe770e3ce
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue