mirror of
https://github.com/msgpack/msgpack-c
synced 2026-06-08 16:11:40 +00:00
a6bf728a5c
In MSGPACK_CHECKED_CALL, the return value of snprintf is incorrectly assumed to mean success if it is less than or equal to the buffer size. The call should only be considered a success if the return value is less than the buffer size. This commit adds two unit tests that illustrates the issue and fixes the issue, making the unit tests pass.