#1094187 ttyrec: susceptible to y2038 (inextricable from format)

Package:
ttyrec
Source:
ttyrec
Description:
Terminal interaction recorder and player (for tty)
Submitter:
наб
Date:
2025-01-25 18:06:02 UTC
Severity:
normal
Tags:
#1094187#5
Date:
2025-01-25 18:02:28 UTC
From:
To:
Dear Maintainer,

The format is read thus:
  int read_header(FILE *fp, Header *h)
  {
      uint32_t buf[3];

      if (fread_wrapper(buf, sizeof(uint32_t), 3, fp) == 0)
      {
          return 0;
      }

      h->tv.tv_sec  = convert_to_little_endian(buf[0]);
      h->tv.tv_usec = convert_to_little_endian(buf[1]);
      h->len        = convert_to_little_endian(buf[2]);

      return 1;
  }

Naturally, this makes it susceptible to y2038.

Given that this format is produced and consumed by multiple
implementations, some sort of Reasonably Coordinated Implementation
needs to be invented here.

Best,