Conversation

afonot
  1. The result of vsnprintf was cast to size_t, which could lead to a signed-to-unsigned overflow error.
  2. There was no handling for cases where vsnprintf returns a negative value or a value greater than NGX_MAX_ERROR_STR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like libxml does not generate the messages which could trigger these issue. Getting an error out of vsnprintf is also non-trivial. But anyway I agree we should handle all possible cases correctly.

@afonotafonot force-pushed the vsnprintf-error-handling branch from ed6b8e8 to 568425f Compare May 15, 2025 20:38
@afonotafonot requested a review from arut May 16, 2025 06:12
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.