Skip to content

fix: check if ua isn't null to avoid undefined behavior#176

Closed
Retropex wants to merge 1 commit intoOCEAN-xyz:masterfrom
Retropex:uanull
Closed

fix: check if ua isn't null to avoid undefined behavior#176
Retropex wants to merge 1 commit intoOCEAN-xyz:masterfrom
Retropex:uanull

Conversation

@Retropex
Copy link
Member

@Retropex Retropex commented Feb 5, 2026

MHD_lookup_connection_value can return NULL if "User-Agent" isn't found and the behavior of strstr() with a NULL value isn't defined (see N3220 section 7.1.4).
I'm adding a check to avoid that.

Credit for the issue.

@luke-jr luke-jr closed this Feb 7, 2026
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.

2 participants