Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

djberg96
Copy link

@djberg96 djberg96 commented Sep 8, 2025

The rugged_rb_ary_to_strarray function uses xmalloc to allocate memory for str_array->strings, but there are several cases where this memory might not be allocated:

If rb_array is NIL_P, the function returns early with strings = NULL. If there's an empty array, the count would be 0. However, in the cleanup sections, the code unconditionally calls xfree(custom_headers.strings) without checking if it's NULL. This can cause "munmap_chunk(): invalid pointer" errors.

Should fix #859

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.

segfault in check_connection
1 participant