Skip to content

Commit

Permalink
Merge pull request #541 from jfcg/master
Browse files Browse the repository at this point in the history
Introduce CodeQL action & ensure message IDs from store are unsigned 16 bit integers when converting.
  • Loading branch information
MattBrittan committed Sep 22, 2021
2 parents 2601804 + be73400 commit 175027d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/codeql-analysis.yml
@@ -0,0 +1,26 @@
name: "CodeQL"

on:
push:
branches: [ master ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'go'

- name: CodeQL Analysis
uses: github/codeql-action/analyze@v1
2 changes: 1 addition & 1 deletion store.go
Expand Up @@ -49,7 +49,7 @@ type Store interface {
// where X is 'i' or 'o'
func mIDFromKey(key string) uint16 {
s := key[2:]
i, err := strconv.Atoi(s)
i, err := strconv.ParseUint(s, 10, 16)
chkerr(err)
return uint16(i)
}
Expand Down

0 comments on commit 175027d

Please sign in to comment.