fix(UnixSecondSerializer.Value): Avoid panic when handling unsigned integer values#7608
Conversation
|
Fix Panic in This pull request addresses a runtime panic in the Key Changes• Refactored Affected Areas• This summary was automatically generated by @propel-code-bot |
Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
…nteger values (go-gorm#7608) * fix reflection panic * testing * fix: do not pass a nil Context * //nolint: gosec * reduce cyclomatic complexity * add a type assertion safety check for time.Time Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com> * test coverage for integer overflow edge case --------- Co-authored-by: david_du <[email protected]> Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
What did this pull request do?
This pull request fixes a panic caused by calling
Int()on uint values inUnixSecondSerializer.Value(), and adds a corresponding unit test to ensure the serializer handles unsigned integers safely.User Case Description
nil.