A unit test didn't cover this, and my review also failed to see it. So, this is a good trigger for adding corresponding test cases, providing an inline function that guards strlen(), and introducing it to the codebase from which future contributors can adapt.
A recent review regarding
strlen()
usage revealed an invalid guard for the user-feedbackcomments
parameter:https://github.com/getsentry/sentry-native/blob/235f837e4038833154f07ed206bbf1b75788a9f0/src/sentry_value.c#L1274
A unit test didn't cover this, and my review also failed to see it. So, this is a good trigger for adding corresponding test cases, providing an inline function that guards
strlen()
, and introducing it to the codebase from which future contributors can adapt.