change: avoid crash on different format versions

laumann
May 26, 2023, 7:14 PM
VXQYIOBXHTYEB62XSIAZGRNNIKXMDZLE5ANBGA7E7V3HOBVEMVSAC

Dependencies

  • [2] QYRJIOYP change: separate decoding and printing of hashed struct
  • [3] 733PFZJ5 prefix header guard names with ANI_
  • [4] 2U7P5SFQ Change struct names "struct foo -> typedef struct Foo"
  • [5] Q7TKZCJP Add initial support for reading the offsets from a (fixed) change
  • [*] LCEKN25G change: parse authors
  • [*] OBKF6SII change: decompress the hashed section too
  • [*] XTKRT6OQ format the codebase

Change contents

  • replacement in change.h at line 9
    [3.160][3.160:185]()
    #define CHANGE_VERSION 6
    [3.160]
    [3.185]
    #define VERSION 6
    #define VERSION_NOENC 4
  • edit in change.c at line 406
    [2.626]
    [7.814]
    // In VERSION_NOENC, the authors are a struct { name: str, full_name: maybe str, email: maybe str } instead of a more generic map
    // TODO switch on offsets.version to figure
    // out how to decode the authors here
  • edit in change.c at line 630
    [8.1874]
    [9.2127]
    if (off.version != VERSION) {
    if (off.version == VERSION_NOENC) {
    printf("The NOENC version (%lu) is not yet supported, sorry (but it's planned)\n",
    off.version);
    } else {
    printf("Version %lu is not yet supported, sorry.\n",
    off.version);
    }
    goto out;
    }