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

[mod_httpapi] Fix possible segfault when HEAD request fails #2766

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

udovichenkoAlexander
Copy link
Contributor

When HEAD request fails with status code different from 404 NOT FOUND then NULL pointer passed to %s because save_path is NULL.

 "caching: url:%s to %s failed with HTTP response code %d\n", url, save_path, (int)code

I do some tests with my backend witch return 400 BAD REQUEST. Logs:

caching: url:... to (null) failed with HTTP response code 400

It's glibc behavior, but this is UB by standart and may lead to SegFault. StackOverflow Question

@andywolk andywolk added the bug Something isn't working label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants