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 OpenArena on glibc 2.37+ and replace all strncpy calls #659

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on May 16, 2024

  1. Configuration menu
    Copy the full SHA
    a8e794c View commit details
    Browse the repository at this point in the history
  2. Add range check for UI text buffer

    It can't overflow because buff and text have the same max length (1024
    and MAX_TOKENLENGTH).
    zturtleman committed May 16, 2024
    Configuration menu
    Copy the full SHA
    53cbb47 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5243bf View commit details
    Browse the repository at this point in the history
  4. Fix handling of overlapping strncpy() in QVMs

    macOS (targeting newer SDKs) and glibc 2.37 changes broke overlapping
    strncpy() used by OpenArena 0.8.8 QVMs. (Technically it was undefined
    behavior.)
    
    Add Q_strncpy() by Eugene C. from Quake3e that allows overlapping dest
    and src for QVM strncpy syscalls.
    
    I made Q_strncpyz() use it for consistency and made QVMs remap the
    Q_strncpy() call to the strncpy syscall in case there is a better idea
    of how to handle strncpy in the future. Try to handle strncpy the same
    in QVMs and DLLs.
    zturtleman committed May 16, 2024
    Configuration menu
    Copy the full SHA
    75d844d View commit details
    Browse the repository at this point in the history