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 strcpy-param-overlap #1548

Merged
merged 1 commit into from
May 5, 2024

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Mar 16, 2024

Found by: michaelortmann
Patch by: michaelortmann
Fixes: #1111

One-line summary:
Fix strcpy-param-overlap

Additional description (if needed):
If your distribution or you compile with CFLAGS -fsanitize=address eggdrop could abort-crash

Test cases demonstrating functionality (if applicable):
compiled eggdrop with -fsanitize=address, run it, load filesys mod (default), issue command .files then ls.

$ ./eggdrop -t BotB.conf
[...]
.files
[...]
ls
=================================================================
==666518==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7829b7b39170,0x7829b7b39173) and [0x7829b7b39170, 0x7829b7b39173) overlap
    #0 0x7829ba8a8be8 in __interceptor_strcpy /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:438
    #1 0x7829b54ba1da in dcc_files .././filesys.mod/filesys.c:232
[...]
==666518==ABORTING
$
[...]
ls
=================================================================
==731401==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x7bb2a5339170,0x7bb2a5339173) and [0x7bb2a5339170, 0x7bb2a5339173) overlap
    #0 0x7bb2a82a8be8 in __interceptor_strcpy /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:438
    #1 0x7bb2a2cb9a49 in got_files_cmd .././filesys.mod/filesys.c:217
[...]
==731401==ABORTING
$

@vanosg vanosg added this to the v1.10.0 milestone May 5, 2024
@vanosg vanosg merged commit 9ab2446 into eggheads:develop May 5, 2024
2 checks passed
@michaelortmann michaelortmann deleted the fix.strcpy-param-overlap3 branch May 6, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

strcpy-param-overlap in filesys.c
2 participants