From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "enum" |
|---|
| subject | "Library:Zlib" |
|---|
| claim | "Since zlib 1.2.9 the inflate_mode values in struct inflate_state (field 'mode', right after the strm back pointer) start at 16180 (0x3F34) instead of 0, so HEAD..SYNC are 16180..16211 (0x3F34..0x3F53); inflateStateCheck() rejects a state whose mode is outside that range. The member list is the same from 1.2.8 to the develop branch." |
|---|
| scope | | level | "library" |
|---|
| applies_to | "Library:Zlib" |
|---|
| observed_in | | "MinGW zlib1.dll 1.3.1: state+8 reads 0x3F34 right after inflateInit" |
|
|---|
|
|---|
| data | | name | "inflate_mode" |
|---|
| underlying_type | "int" |
|---|
| values | | 16180 | "HEAD" |
|---|
| 16181 | "FLAGS" |
|---|
| 16182 | "TIME" |
|---|
| 16183 | "OS" |
|---|
| 16184 | "EXLEN" |
|---|
| 16185 | "EXTRA" |
|---|
| 16186 | "NAME" |
|---|
| 16187 | "COMMENT" |
|---|
| 16188 | "HCRC" |
|---|
| 16189 | "DICTID" |
|---|
| 16190 | "DICT" |
|---|
| 16191 | "TYPE" |
|---|
| 16192 | "TYPEDO" |
|---|
| 16193 | "STORED" |
|---|
| 16194 | "COPY_" |
|---|
| 16195 | "COPY" |
|---|
| 16196 | "TABLE" |
|---|
| 16197 | "LENLENS" |
|---|
| 16198 | "CODELENS" |
|---|
| 16199 | "LEN_" |
|---|
| 16200 | "LEN" |
|---|
| 16201 | "LENEXT" |
|---|
| 16202 | "DIST" |
|---|
| 16203 | "DISTEXT" |
|---|
| 16204 | "MATCH" |
|---|
| 16205 | "LIT" |
|---|
| 16206 | "CHECK" |
|---|
| 16207 | "LENGTH" |
|---|
| 16208 | "DONE" |
|---|
| 16209 | "BAD" |
|---|
| 16210 | "MEM" |
|---|
| 16211 | "SYNC" |
|---|
|
|---|
| complete | true |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "typedef enum { HEAD = 16180, FLAGS, ... SYNC } inflate_mode; HEAD = 16180 first appears at tag v1.2.9 (v1.2.8 has HEAD = 0 implicitly)" |
|---|
| repo | "https://github.com/madler/zlib" |
|---|
| commit | "767c4c947852e143f582c85f14cf573411df1b35" |
|---|
| path | "inflate.h" |
|---|
| lines | "20-53" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "ctypes on MinGW Win64 zlib1.dll 1.3.1: after inflateInit_ the first 8 bytes of *strm->state equal the z_stream address and the next int is 0x3F34." |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "inflate mode" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T05:49:44.145Z" |
|---|
| verifications | |
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-19T13:25:35.374Z" |
|---|
| summary | "Read inflate.h 20-53: 32 members HEAD=16180 to SYNC=16211 in the listed order; complete." |
|---|
| changed | |
|---|
|
|
|---|