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

Miscellaneous bug fixes and improvements #2679

Merged
merged 8 commits into from
May 14, 2024
Merged

Commits on May 8, 2024

  1. Constify read-only data

    Declare read-only data arrays const, to warn on accidental modification
    and let compilers place them in read-only memory sections.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    d365da7 View commit details
    Browse the repository at this point in the history
  2. Deduplicate strtoupper()

    Avoid the duplicate definition of strtoupper() in websocket.c, just use
    the one from util.h.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    2716cfa View commit details
    Browse the repository at this point in the history
  3. Avoid UB in character checking functions

    The functions classifying characters like isspace(3) require the input
    to be of type unsigned char or EOF.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    33f93c5 View commit details
    Browse the repository at this point in the history
  4. Avoid out-of-bounds access in serial processing mode

    When using just one job for processing the input lines do not use the
    out-of-bounds index 1 instead of the valid one 0.  This currently seems
    to only work since the stack space of the in this case unused threads
    array is used.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    243bef8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10bebef View commit details
    Browse the repository at this point in the history
  6. Avoid out-of-bounds access for invalid HTTP status codes

    Avoid array access in case the status code is less than 0 or bigger than
    599.
    
    Also reduce the size of the codes array.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    e928824 View commit details
    Browse the repository at this point in the history
  7. Avoid unnecessary string copies

    Do not duplicate the strings for enumeration keys, as they are read-
    only.
    cgzones committed May 8, 2024
    Configuration menu
    Copy the full SHA
    3c19282 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Fix two missing instances of string copy refactoring

    These two locations are only enabled via `--enable-debug`.
    cgzones committed May 14, 2024
    Configuration menu
    Copy the full SHA
    c6e08f3 View commit details
    Browse the repository at this point in the history