ssbc / bendy-butt-spec

6 stars 0 forks source link

Year 2038 problem #20

Closed JesperTreetop closed 2 years ago

JesperTreetop commented 2 years ago

Item 4 in the specification mentions:

timestamp, a 32 bit integer representing the UNIX epoch timestamp of message creation.

If the integer is signed, this allows only a further ~16 years until UNIX epoch timestamp wraparound, which for a purposely long-term format I assume is an issue. (If it's an unsigned integer, it extends it until 2106, which may give "sufficient" additional time for the life of the format.)

staltz commented 2 years ago

Really good observation! Bencode integers are unlimited, so in the binary encoding we are completely future-proof, but in practice implementations should use signed 64 bit integers. See the two PRs linked to this issue.

JesperTreetop commented 2 years ago

Quick turnaround! I know that bencoded integers are ASCII decimal digits, it was more about the explicit mention of "32-bit"-ness, which some people may build into deserialization invariants. The test clarifies what the expected behavior is though.

staltz commented 2 years ago

With those 2 PRs merged, I believe this issue is now addressed.