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

clients/nycli/utils.c: Fix buffer overflow #34

Merged
merged 1 commit into from Mar 9, 2024

Commits on Mar 9, 2024

  1. clients/nycli/utils.c: Fix buffer overflow

    format_url() is only assigning 255 bytes for the rpath, but the path will
    be expanded by realpath() which can return a sring up to a maximum of
    PATH_MAX bytes. And, so as a result, if long path names are used or
    while creating playlists with multiple files we get a coredump with the
    error:
    
    *** buffer overflow detected ***: terminated
    Aborted (core dumped)
    
    Lets use PATH_MAX for rpath length so that we have buffer for the
    maximum return from realpath().
    
    Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
    sudipm-mukherjee committed Mar 9, 2024
    Configuration menu
    Copy the full SHA
    2665139 View commit details
    Browse the repository at this point in the history