Closed weichou1229 closed 6 days ago
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Attention: Patch coverage is 0%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 32.74%. Comparing base (
124a5f1
) to head (22d23d7
).
Files with missing lines | Patch % | Lines |
---|---|---|
internal/driver/subscriptionrequest.go | 0.00% | 2 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fixes https://github.com/edgexfoundry/device-onvif-camera/security/code-scanning/2
To fix the problem, we need to ensure that the integer value parsed from the string is within the bounds of
int32
before converting it. This can be done by usingstrconv.ParseInt
with a bit size of 32, which directly parses the string into anint32
value, or by adding explicit bounds checks before the conversion.In this case, we will use
strconv.ParseInt
with a bit size of 32 to parse theMessageLimit
value. This ensures that the parsed value is within the bounds ofint32
.Suggested fixes powered by Copilot Autofix. Review carefully before merging.