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

Fix potential memcpy call with null dest #78

Commits on Jan 11, 2021

  1. Fix potential memcpy call with null dest

    Add a check into CCID_Receive() in commands.c that skips calling
    memcpy() in case the count is zero. This fixes the (theoretical) problem
    in case both the count and the dest pointer are zero (such a call can be
    made, e.g., from CmdXfrBlockAPDU_extended()) and the compiler uses the
    non-null argument requirement to generate some incorrect code.
    
    This potential issue was found by clang-tidy (the
    "NonNullParamChecker" diagnostic).
    emaxx-google committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    e7b2149 View commit details
    Browse the repository at this point in the history