laurencelundblade / QCBOR

Comprehensive, powerful, commercial-quality CBOR encoder/ decoder that is still suited for small devices.
Other
183 stars 47 forks source link

Fix static analyzer complaint about INT64_MIN #173

Closed laurencelundblade closed 1 year ago

laurencelundblade commented 1 year ago

Fixes static analyzer warnings for INT64_MIN for QCBORDecode_GetInt64ConvertAll().

Adds a test for decoding of INT64_MIN by QCBORDecode_GetInt64ConvertAll()

While this wasn't tested previously, it appears the previous code did function correctly because gcc and clang have built in handling for the INT64_MIN case, thus this is label as an issue only with static analyzers. In any case, the code is correct now.

This also includes a large improvement in the comments for code that does integer conversion