Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed timestamp_us overflow #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Mar 7, 2023

  1. fixed timestamp_us overflow

    When packing timestamp_us into a 32-bit unsigned integer, struct.pack can throws an exception if the number is bigger than 2^32.
    
    Some software sets the frame timestamp to be time.time(), meaning that the exception is thrown immediately.
    (see scapy: https://github.com/secdev/scapy/blob/master/scapy/contrib/cansocket_python_can.py#L319)
    
    I would recommend doing a bitwise and with 0xffffffff to ensure the timestamp fits into the 32-bit integer
    epozzobon authored Mar 7, 2023
    Configuration menu
    Copy the full SHA
    8429bbd View commit details
    Browse the repository at this point in the history