Skip to content

core: fix interval MsgPack decoding#11730

Merged
locker merged 1 commit intotarantool:masterfrom
nshy:gh-10360-fix-interval-mp-decoding
Aug 6, 2025
Merged

core: fix interval MsgPack decoding#11730
locker merged 1 commit intotarantool:masterfrom
nshy:gh-10360-fix-interval-mp-decoding

Conversation

@nshy
Copy link
Contributor

@nshy nshy commented Aug 4, 2025

Currently we do not check if we have enough data to read when loading field key.

While at it also fix limits checking for year, month, week and nanoseconds fields we lost in the commit 01c7ae1 ("msgpack: fix decoding intervals with int64").

Also as we check the upper limit for ajust field let's check the lower limit too.

Closes #10360

@nshy nshy requested a review from a team as a code owner August 4, 2025 14:00
@nshy nshy requested a review from locker August 4, 2025 14:26
@locker locker assigned nshy and unassigned locker Aug 4, 2025
@nshy nshy force-pushed the gh-10360-fix-interval-mp-decoding branch 2 times, most recently from f74f62e to 20baafc Compare August 5, 2025 13:45
@coveralls
Copy link

coveralls commented Aug 5, 2025

Coverage Status

coverage: 87.586% (+0.01%) from 87.572%
when pulling 1f6d24b on nshy:gh-10360-fix-interval-mp-decoding
into d324811
on tarantool:master
.

@nshy nshy assigned locker and unassigned nshy Aug 5, 2025
@locker locker assigned nshy and unassigned locker Aug 5, 2025
Currently we do not check if we have enough data to read when
loading field key.

While at it also fix limits checking for `year`, `month`, `week` and
`nanoseconds` fields we lost in the commit 01c7ae1 ("msgpack: fix
decoding intervals with int64").

Also as we check the upper limit for `ajust` field let's check the lower
limit too.

Closes tarantool#10360

NO_DOC=bugfix
@nshy nshy force-pushed the gh-10360-fix-interval-mp-decoding branch from 20baafc to 1f6d24b Compare August 6, 2025 07:16
@nshy nshy added the full-ci Enables all tests for a pull request label Aug 6, 2025
@nshy nshy assigned locker and unassigned nshy Aug 6, 2025
@locker locker merged commit 9951750 into tarantool:master Aug 6, 2025
60 of 62 checks passed
@locker
Copy link
Member

locker commented Aug 6, 2025

Cherry-picked to 3.2, 3.3, 3.4.

@nshy nshy deleted the gh-10360-fix-interval-mp-decoding branch August 6, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-ci Enables all tests for a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIGSEGV on parsing MessagePack buffer: mp_check_uint: Assertion `cur < end' failed.

4 participants