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

http: Avoid undefined behavior in va_arg conversion #34

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

Commits on Jul 6, 2022

  1. http: Avoid undefined behavior in va_arg conversion

    Subtracting a null pointer is undefined behavior according to
    Clang 13 (-Wnull-pointer-subtraction). Avoid this by casting to
    intptr_t instead.
    
    Request macros (e.g. OP_GET_SERVER_INFO) already do a simple cast
    `((char*)_request)` rather than addition with null pointer
    `(_request+(char*)NULL)` so nothing needs to be changed on that end.
    daddesio committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    5eb65b1 View commit details
    Browse the repository at this point in the history