mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
More CodeQL fixes
This commit is contained in:
parent
adfcffa5d7
commit
237bb35ee9
6 changed files with 25 additions and 14 deletions
|
|
@ -4,6 +4,7 @@ package loop
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
|
|
@ -152,7 +153,7 @@ func KeyEventFromCSI(csi string) *KeyEvent {
|
|||
ans[i] = missing
|
||||
} else {
|
||||
q, err := strconv.ParseUint(x, 10, 32)
|
||||
if err != nil {
|
||||
if err != nil || q > math.MaxInt32 {
|
||||
return nil
|
||||
}
|
||||
ans[i] = int32(q)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue