go-libaudit icon indicating copy to clipboard operation
go-libaudit copied to clipboard

fix: Fixes possible wrong lost events count

Open Darkheir opened this issue 2 years ago • 2 comments

When the last sequence is equal or higher to the current sequence the uint to int conversion results in a wrong count.

Here's a simple example reproducing the issue:

last_sequence := uint32(10)
sequence := uint32(10)

int(sequence - last_sequence - 1)  // Will give 4294967295

Darkheir avatar Jan 03 '23 10:01 Darkheir

💚 CLA has been signed

:grey_exclamation: Build Aborted

The PR is not allowed to run in the CI yet

the below badges are clickable and redirect to their specific view in the CI or DOCS Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Start Time: 2023-01-03T10:53:16.643+0000

  • Duration: 2 min 10 sec

Steps errors 2

Expand to view the steps failures

Load a resource file from a library
  • Took 0 min 0 sec . View more details here
  • Description: approval-list/elastic/go-libaudit.yml
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: githubApiCall: The REST API call https://api.github.com/orgs/elastic/members/Darkheir return the message : java.lang.Exception: httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/Darkheir : httpRequest: Failure connecting to the service https://api.github.com/orgs/elastic/members/Darkheir : Code: 404Error: {"message":"User does not exist or is not a member of the organization","documentation_url":"https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user"}

elasticmachine avatar Jan 03 '23 10:01 elasticmachine