Skip to content

Commit

Permalink
Merge pull request #1296 from NickeZ/nickez/various-fixes
Browse files Browse the repository at this point in the history
Nickez/various fixes
  • Loading branch information
NickeZ authored Sep 2, 2024
2 parents dc77cda + 5bf1f1b commit 70a2929
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Checks: >-
-bugprone-narrowing-conversions,
-performance-no-int-to-ptr,
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,
-readability-avoid-unconditional-preprocessor-if
-readability-avoid-unconditional-preprocessor-if,
-readability-suspicious-call-argument
HeaderFilterRegex: '.*'
ExtraArgs:
- -Wno-unknown-warning-option
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

name: Pull request CI
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
pr-head-ci:
Expand Down Expand Up @@ -47,13 +50,13 @@ jobs:
runs-on: ubuntu-22.04
needs: [ generate-matrix ]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
if: needs.generate-matrix.outputs.matrix != ''
steps:
- name: Clone the repo
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
ref: ${{ github.event.pull_request.base.sha }}

Expand All @@ -66,6 +69,7 @@ jobs:
run: |
git fetch origin ${{ matrix.commit }} ${{ github.event.pull_request.merge_commit_sha }}
git merge --no-ff --no-edit ${{ matrix.commit }}
git submodule update --init --recursive
git log -1 --format="Head %H, Parents %P"
# Since the workflow definition is taken from the pull request merge commit, we need to
# get the .ci scripts from there as well.
Expand Down
3 changes: 2 additions & 1 deletion src/u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,8 @@ static void _authenticate_continue(const USB_APDU* apdu, Packet* out_packet)
size_t auth_packet_len = sizeof(U2F_AUTHENTICATE_RESP) - U2F_MAX_EC_SIG_SIZE + der_len;

// Append success bytes
memcpy(buf + auth_packet_len, "\x90\x00", 2);
uint8_t success_bytes[] = {0x90, 0x00};
memcpy(buf + auth_packet_len, success_bytes, sizeof(success_bytes));

_fill_message(buf, auth_packet_len + 2, out_packet);
}
Expand Down

0 comments on commit 70a2929

Please sign in to comment.