pure_errors.h (20660B)
1 enum PURE_E { 2 PURE_E_OK, 3 PURE_E_SIZE_MAX, 4 PURE_E_MALLOC, 5 PURE_E_STRING_NOT_FOUND, 6 PURE_E_UINT64_OVERFLOW, 7 PURE_E_ZIP_BOMB_ARCHIVES, 8 PURE_E_ZIP_BOMB_DEPTH, 9 PURE_E_ZIP_BOMB_FIFIELD, 10 PURE_E_ZIP_BOMB_FILES, 11 PURE_E_ZIP_BOMB_RATIO, 12 PURE_E_ZIP_BOMB_INFLATE_COMPRESSED_OVERFLOW, 13 PURE_E_ZIP_BOMB_INFLATE_UNCOMPRESSED_OVERFLOW, 14 PURE_E_ZIP_TOO_SMALL, 15 PURE_E_ZIP_SIZE_4GB, 16 PURE_E_ZIP_RAR, 17 PURE_E_ZIP_TAR, 18 PURE_E_ZIP_XAR, 19 PURE_E_ZIP_SIGNATURE, 20 PURE_E_ZIP_EOCDR_NOT_FOUND, 21 PURE_E_ZIP_EOCDR_OVERFLOW, 22 PURE_E_ZIP_EOCDR_COMMENT_OVERFLOW, 23 PURE_E_ZIP_EOCDR_SIGNATURE, 24 PURE_E_ZIP_EOCDR_RECORDS, 25 PURE_E_ZIP_EOCDR_SIZE_OVERFLOW, 26 PURE_E_ZIP_EOCDR_SIZE_UNDERFLOW, 27 PURE_E_ZIP_MULTIPLE_DISKS, 28 PURE_E_ZIP_APPENDED_DATA_ZEROED, 29 PURE_E_ZIP_APPENDED_DATA_BUFFER_BLEED, 30 PURE_E_ZIP_PREPENDED_DATA, 31 PURE_E_ZIP_PREPENDED_DATA_ZEROED, 32 PURE_E_ZIP_PREPENDED_DATA_BUFFER_BLEED, 33 PURE_E_ZIP_CDH_OVERFLOW, 34 PURE_E_ZIP_CDH_SIGNATURE, 35 PURE_E_ZIP_CDH_RELATIVE_OFFSET_OVERFLOW, 36 PURE_E_ZIP_CDH_RELATIVE_OFFSET_OVERLAP, 37 PURE_E_ZIP_CDH_FILE_NAME_OVERFLOW, 38 PURE_E_ZIP_CDH_EXTRA_FIELD_OVERFLOW, 39 PURE_E_ZIP_CDH_FILE_COMMENT_OVERFLOW, 40 PURE_E_ZIP_LFH_OVERFLOW, 41 PURE_E_ZIP_LFH_SIGNATURE, 42 PURE_E_ZIP_LFH_FILE_NAME_OVERFLOW, 43 PURE_E_ZIP_LFH_EXTRA_FIELD_OVERFLOW, 44 PURE_E_ZIP_LFH_UNDERFLOW_ZEROED, 45 PURE_E_ZIP_LFH_UNDERFLOW_BUFFER_BLEED, 46 PURE_E_ZIP_LFH_DATA_OVERFLOW, 47 PURE_E_ZIP_DDR_OVERFLOW, 48 PURE_E_ZIP_LF_OVERFLOW, 49 PURE_E_ZIP_LF_UNDERFLOW_ZEROED, 50 PURE_E_ZIP_LF_UNDERFLOW_BUFFER_BLEED, 51 PURE_E_ZIP_CD_OVERFLOW, 52 PURE_E_ZIP_CD_UNDERFLOW_ZEROED, 53 PURE_E_ZIP_CD_UNDERFLOW_BUFFER_BLEED, 54 PURE_E_ZIP_CD_EOCDR_OVERFLOW, 55 PURE_E_ZIP_CD_EOCDR_UNDERFLOW_ZEROED, 56 PURE_E_ZIP_CD_EOCDR_UNDERFLOW_BUFFER_BLEED, 57 PURE_E_ZIP_DIFF_LFH_GENERAL_PURPOSE_BIT_FLAG, 58 PURE_E_ZIP_DIFF_LFH_COMPRESSION_METHOD, 59 PURE_E_ZIP_DIFF_LFH_LAST_MOD_FILE_TIME, 60 PURE_E_ZIP_DIFF_LFH_LAST_MOD_FILE_DATE, 61 PURE_E_ZIP_DIFF_LFH_CRC32, 62 PURE_E_ZIP_DIFF_LFH_COMPRESSED_SIZE, 63 PURE_E_ZIP_DIFF_LFH_UNCOMPRESSED_SIZE, 64 PURE_E_ZIP_DIFF_LFH_FILE_NAME_LENGTH, 65 PURE_E_ZIP_DIFF_LFH_FILE_NAME, 66 PURE_E_ZIP_DIFF_LFH_DDR_CRC32, 67 PURE_E_ZIP_DIFF_LFH_DDR_COMPRESSED_SIZE, 68 PURE_E_ZIP_DIFF_LFH_DDR_UNCOMPRESSED_SIZE, 69 PURE_E_ZIP_DIFF_DDR_CRC32, 70 PURE_E_ZIP_DIFF_DDR_COMPRESSED_SIZE, 71 PURE_E_ZIP_DIFF_DDR_UNCOMPRESSED_SIZE, 72 PURE_E_ZIP_FLAG_OVERFLOW, 73 PURE_E_ZIP_FLAG_TRADITIONAL_ENCRYPTION, 74 PURE_E_ZIP_FLAG_ENHANCED_DEFLATE, 75 PURE_E_ZIP_FLAG_COMPRESSED_PATCHED_DATA, 76 PURE_E_ZIP_FLAG_STRONG_ENCRYPTION, 77 PURE_E_ZIP_FLAG_UNUSED_BIT_7, 78 PURE_E_ZIP_FLAG_UNUSED_BIT_8, 79 PURE_E_ZIP_FLAG_UNUSED_BIT_9, 80 PURE_E_ZIP_FLAG_UNUSED_BIT_10, 81 PURE_E_ZIP_FLAG_ENHANCED_COMPRESSION, 82 PURE_E_ZIP_FLAG_MASKED_LOCAL_HEADERS, 83 PURE_E_ZIP_FLAG_RESERVED_BIT_14, 84 PURE_E_ZIP_FLAG_RESERVED_BIT_15, 85 PURE_E_ZIP_COMPRESSION_METHOD_DANGEROUS, 86 PURE_E_ZIP_COMPRESSION_METHOD_ENCRYPTED, 87 PURE_E_ZIP_COMPRESSION_METHOD_UNSUPPORTED, 88 PURE_E_ZIP_STORED_COMPRESSION_SIZE_MISMATCH, 89 PURE_E_ZIP_DANGEROUS_NEGATIVE_COMPRESSION_RATIO, 90 PURE_E_ZIP_TIME_OVERFLOW, 91 PURE_E_ZIP_TIME_HOUR_OVERFLOW, 92 PURE_E_ZIP_TIME_MINUTE_OVERFLOW, 93 PURE_E_ZIP_TIME_SECOND_OVERFLOW, 94 PURE_E_ZIP_DATE_OVERFLOW, 95 PURE_E_ZIP_DATE_YEAR_OVERFLOW, 96 PURE_E_ZIP_DATE_MONTH_OVERFLOW, 97 PURE_E_ZIP_DATE_DAY_OVERFLOW, 98 PURE_E_ZIP_FILE_NAME_LENGTH, 99 PURE_E_ZIP_FILE_NAME_CONTROL_CHARACTERS, 100 PURE_E_ZIP_FILE_NAME_TRAVERSAL_DRIVE_PATH, 101 PURE_E_ZIP_FILE_NAME_TRAVERSAL_RELATIVE_PATH, 102 PURE_E_ZIP_FILE_NAME_TRAVERSAL_DOUBLE_DOTS, 103 PURE_E_ZIP_FILE_NAME_COMPONENT_OVERFLOW, 104 PURE_E_ZIP_FILE_NAME_BACKSLASH, 105 PURE_E_ZIP_EXTRA_FIELD_MAX, 106 PURE_E_ZIP_EXTRA_FIELD_MIN, 107 PURE_E_ZIP_EXTRA_FIELD_ATTRIBUTE_OVERFLOW, 108 PURE_E_ZIP_EXTRA_FIELD_OVERFLOW, 109 PURE_E_ZIP_EXTRA_FIELD_UNDERFLOW_ZEROED, 110 PURE_E_ZIP_EXTRA_FIELD_UNDERFLOW_BUFFER_BLEED, 111 PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_OVERFLOW, 112 PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_VERSION, 113 PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_DIFF, 114 PURE_E_ZIP_UNIX_MODE_OVERFLOW, 115 PURE_E_ZIP_UNIX_MODE_BLOCK_DEVICE, 116 PURE_E_ZIP_UNIX_MODE_CHARACTER_DEVICE, 117 PURE_E_ZIP_UNIX_MODE_FIFO, 118 PURE_E_ZIP_UNIX_MODE_SOCKET, 119 PURE_E_ZIP_UNIX_MODE_PERMISSIONS_STICKY, 120 PURE_E_ZIP_UNIX_MODE_PERMISSIONS_SETGID, 121 PURE_E_ZIP_UNIX_MODE_PERMISSIONS_SETUID, 122 PURE_E_ZIP_DIRECTORY_COMPRESSED, 123 PURE_E_ZIP_DIRECTORY_UNCOMPRESSED, 124 PURE_E_ZIP_SYMLINK_COMPRESSED, 125 PURE_E_ZIP_SYMLINK_LENGTH, 126 PURE_E_ZIP_SYMLINK_CONTROL_CHARACTERS, 127 PURE_E_ZIP_SYMLINK_TRAVERSAL_DRIVE_PATH, 128 PURE_E_ZIP_SYMLINK_TRAVERSAL_RELATIVE_PATH, 129 PURE_E_ZIP_SYMLINK_TRAVERSAL_DOUBLE_DOTS, 130 PURE_E_ZIP_SYMLINK_COMPONENT_OVERFLOW, 131 PURE_E_ZIP_STRING_MAX, 132 PURE_E_ZIP_STRING_NULL_BYTE, 133 PURE_E_ZIP_INFLATE, 134 PURE_E_ZIP_INFLATE_DICTIONARY, 135 PURE_E_ZIP_INFLATE_STREAM, 136 PURE_E_ZIP_INFLATE_DATA, 137 PURE_E_ZIP_INFLATE_MEMORY, 138 PURE_E_ZIP_INFLATE_COMPRESSED_UNDERFLOW, 139 PURE_E_ZIP_INFLATE_UNCOMPRESSED_UNDERFLOW, 140 PURE_E_ZIP_AD_NIHILO, 141 PURE_E_ZIP_EX_NIHILO, 142 PURE_E_ZIP_CRC32, 143 PURE_E_ZIP_EOCDL_64_OVERFLOW, 144 PURE_E_ZIP_EOCDL_64_SIGNATURE, 145 PURE_E_ZIP_EOCDL_64_NEGATIVE_OFFSET, 146 PURE_E_ZIP_EOCDL_64_DISK, 147 PURE_E_ZIP_EOCDL_64_DISKS, 148 PURE_E_ZIP_EOCDR_64_OVERFLOW, 149 PURE_E_ZIP_EOCDR_64_SIGNATURE, 150 PURE_E_ZIP_EOCDR_EOCDL_64_OVERFLOW, 151 PURE_E_ZIP_EOCDR_EOCDL_64_UNDERFLOW_ZEROED, 152 PURE_E_ZIP_EOCDR_EOCDL_64_UNDERFLOW_BUFFER_BLEED, 153 PURE_E_ZIP_DIFF_EOCDR_DISK, 154 PURE_E_ZIP_DIFF_EOCDR_CD_DISK, 155 PURE_E_ZIP_DIFF_EOCDR_CD_DISK_RECORDS, 156 PURE_E_ZIP_DIFF_EOCDR_CD_RECORDS, 157 PURE_E_ZIP_DIFF_EOCDR_CD_SIZE, 158 PURE_E_ZIP_DIFF_EOCDR_CD_OFFSET, 159 PURE_E_ZIP_EIEF_64_COMPRESSED_SIZE, 160 PURE_E_ZIP_EIEF_64_DISK, 161 PURE_E_ZIP_EIEF_64_RELATIVE_OFFSET, 162 PURE_E_ZIP_EIEF_64_UNCOMPRESSED_SIZE, 163 PURE_E_ZIP_EIEF_64_UNDERFLOW_ZEROED, 164 PURE_E_ZIP_EIEF_64_UNDERFLOW_BUFFER_BLEED, 165 PURE_E_ZIP_EIEF_64_LFH, 166 PURE_E_ZIP_DIRECTORY_HAS_NO_LFH, 167 // Capture enum length for bounds checking by pure_error_string(): 168 PURE_E_ENUM_LENGTH 169 }; 170 171 const char* const PURE_E_CODES[] = { 172 "PURE_E_OK", 173 "PURE_E_SIZE_MAX", 174 "PURE_E_MALLOC", 175 "PURE_E_STRING_NOT_FOUND", 176 "PURE_E_UINT64_OVERFLOW", 177 "PURE_E_ZIP_BOMB_ARCHIVES", 178 "PURE_E_ZIP_BOMB_DEPTH", 179 "PURE_E_ZIP_BOMB_FIFIELD", 180 "PURE_E_ZIP_BOMB_FILES", 181 "PURE_E_ZIP_BOMB_RATIO", 182 "PURE_E_ZIP_BOMB_INFLATE_COMPRESSED_OVERFLOW", 183 "PURE_E_ZIP_BOMB_INFLATE_UNCOMPRESSED_OVERFLOW", 184 "PURE_E_ZIP_TOO_SMALL", 185 "PURE_E_ZIP_SIZE_4GB", 186 "PURE_E_ZIP_RAR", 187 "PURE_E_ZIP_TAR", 188 "PURE_E_ZIP_XAR", 189 "PURE_E_ZIP_SIGNATURE", 190 "PURE_E_ZIP_EOCDR_NOT_FOUND", 191 "PURE_E_ZIP_EOCDR_OVERFLOW", 192 "PURE_E_ZIP_EOCDR_COMMENT_OVERFLOW", 193 "PURE_E_ZIP_EOCDR_SIGNATURE", 194 "PURE_E_ZIP_EOCDR_RECORDS", 195 "PURE_E_ZIP_EOCDR_SIZE_OVERFLOW", 196 "PURE_E_ZIP_EOCDR_SIZE_UNDERFLOW", 197 "PURE_E_ZIP_MULTIPLE_DISKS", 198 "PURE_E_ZIP_APPENDED_DATA_ZEROED", 199 "PURE_E_ZIP_APPENDED_DATA_BUFFER_BLEED", 200 "PURE_E_ZIP_PREPENDED_DATA", 201 "PURE_E_ZIP_PREPENDED_DATA_ZEROED", 202 "PURE_E_ZIP_PREPENDED_DATA_BUFFER_BLEED", 203 "PURE_E_ZIP_CDH_OVERFLOW", 204 "PURE_E_ZIP_CDH_SIGNATURE", 205 "PURE_E_ZIP_CDH_RELATIVE_OFFSET_OVERFLOW", 206 "PURE_E_ZIP_CDH_RELATIVE_OFFSET_OVERLAP", 207 "PURE_E_ZIP_CDH_FILE_NAME_OVERFLOW", 208 "PURE_E_ZIP_CDH_EXTRA_FIELD_OVERFLOW", 209 "PURE_E_ZIP_CDH_FILE_COMMENT_OVERFLOW", 210 "PURE_E_ZIP_LFH_OVERFLOW", 211 "PURE_E_ZIP_LFH_SIGNATURE", 212 "PURE_E_ZIP_LFH_FILE_NAME_OVERFLOW", 213 "PURE_E_ZIP_LFH_EXTRA_FIELD_OVERFLOW", 214 "PURE_E_ZIP_LFH_UNDERFLOW_ZEROED", 215 "PURE_E_ZIP_LFH_UNDERFLOW_BUFFER_BLEED", 216 "PURE_E_ZIP_LFH_DATA_OVERFLOW", 217 "PURE_E_ZIP_DDR_OVERFLOW", 218 "PURE_E_ZIP_LF_OVERFLOW", 219 "PURE_E_ZIP_LF_UNDERFLOW_ZEROED", 220 "PURE_E_ZIP_LF_UNDERFLOW_BUFFER_BLEED", 221 "PURE_E_ZIP_CD_OVERFLOW", 222 "PURE_E_ZIP_CD_UNDERFLOW_ZEROED", 223 "PURE_E_ZIP_CD_UNDERFLOW_BUFFER_BLEED", 224 "PURE_E_ZIP_CD_EOCDR_OVERFLOW", 225 "PURE_E_ZIP_CD_EOCDR_UNDERFLOW_ZEROED", 226 "PURE_E_ZIP_CD_EOCDR_UNDERFLOW_BUFFER_BLEED", 227 "PURE_E_ZIP_DIFF_LFH_GENERAL_PURPOSE_BIT_FLAG", 228 "PURE_E_ZIP_DIFF_LFH_COMPRESSION_METHOD", 229 "PURE_E_ZIP_DIFF_LFH_LAST_MOD_FILE_TIME", 230 "PURE_E_ZIP_DIFF_LFH_LAST_MOD_FILE_DATE", 231 "PURE_E_ZIP_DIFF_LFH_CRC32", 232 "PURE_E_ZIP_DIFF_LFH_COMPRESSED_SIZE", 233 "PURE_E_ZIP_DIFF_LFH_UNCOMPRESSED_SIZE", 234 "PURE_E_ZIP_DIFF_LFH_FILE_NAME_LENGTH", 235 "PURE_E_ZIP_DIFF_LFH_FILE_NAME", 236 "PURE_E_ZIP_DIFF_LFH_DDR_CRC32", 237 "PURE_E_ZIP_DIFF_LFH_DDR_COMPRESSED_SIZE", 238 "PURE_E_ZIP_DIFF_LFH_DDR_UNCOMPRESSED_SIZE", 239 "PURE_E_ZIP_DIFF_DDR_CRC32", 240 "PURE_E_ZIP_DIFF_DDR_COMPRESSED_SIZE", 241 "PURE_E_ZIP_DIFF_DDR_UNCOMPRESSED_SIZE", 242 "PURE_E_ZIP_FLAG_OVERFLOW", 243 "PURE_E_ZIP_FLAG_TRADITIONAL_ENCRYPTION", 244 "PURE_E_ZIP_FLAG_ENHANCED_DEFLATE", 245 "PURE_E_ZIP_FLAG_COMPRESSED_PATCHED_DATA", 246 "PURE_E_ZIP_FLAG_STRONG_ENCRYPTION", 247 "PURE_E_ZIP_FLAG_UNUSED_BIT_7", 248 "PURE_E_ZIP_FLAG_UNUSED_BIT_8", 249 "PURE_E_ZIP_FLAG_UNUSED_BIT_9", 250 "PURE_E_ZIP_FLAG_UNUSED_BIT_10", 251 "PURE_E_ZIP_FLAG_ENHANCED_COMPRESSION", 252 "PURE_E_ZIP_FLAG_MASKED_LOCAL_HEADERS", 253 "PURE_E_ZIP_FLAG_RESERVED_BIT_14", 254 "PURE_E_ZIP_FLAG_RESERVED_BIT_15", 255 "PURE_E_ZIP_COMPRESSION_METHOD_DANGEROUS", 256 "PURE_E_ZIP_COMPRESSION_METHOD_ENCRYPTED", 257 "PURE_E_ZIP_COMPRESSION_METHOD_UNSUPPORTED", 258 "PURE_E_ZIP_STORED_COMPRESSION_SIZE_MISMATCH", 259 "PURE_E_ZIP_DANGEROUS_NEGATIVE_COMPRESSION_RATIO", 260 "PURE_E_ZIP_TIME_OVERFLOW", 261 "PURE_E_ZIP_TIME_HOUR_OVERFLOW", 262 "PURE_E_ZIP_TIME_MINUTE_OVERFLOW", 263 "PURE_E_ZIP_TIME_SECOND_OVERFLOW", 264 "PURE_E_ZIP_DATE_OVERFLOW", 265 "PURE_E_ZIP_DATE_YEAR_OVERFLOW", 266 "PURE_E_ZIP_DATE_MONTH_OVERFLOW", 267 "PURE_E_ZIP_DATE_DAY_OVERFLOW", 268 "PURE_E_ZIP_FILE_NAME_LENGTH", 269 "PURE_E_ZIP_FILE_NAME_CONTROL_CHARACTERS", 270 "PURE_E_ZIP_FILE_NAME_TRAVERSAL_DRIVE_PATH", 271 "PURE_E_ZIP_FILE_NAME_TRAVERSAL_RELATIVE_PATH", 272 "PURE_E_ZIP_FILE_NAME_TRAVERSAL_DOUBLE_DOTS", 273 "PURE_E_ZIP_FILE_NAME_COMPONENT_OVERFLOW", 274 "PURE_E_ZIP_FILE_NAME_BACKSLASH", 275 "PURE_E_ZIP_EXTRA_FIELD_MAX", 276 "PURE_E_ZIP_EXTRA_FIELD_MIN", 277 "PURE_E_ZIP_EXTRA_FIELD_ATTRIBUTE_OVERFLOW", 278 "PURE_E_ZIP_EXTRA_FIELD_OVERFLOW", 279 "PURE_E_ZIP_EXTRA_FIELD_UNDERFLOW_ZEROED", 280 "PURE_E_ZIP_EXTRA_FIELD_UNDERFLOW_BUFFER_BLEED", 281 "PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_OVERFLOW", 282 "PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_VERSION", 283 "PURE_E_ZIP_EXTRA_FIELD_UNICODE_PATH_DIFF", 284 "PURE_E_ZIP_UNIX_MODE_OVERFLOW", 285 "PURE_E_ZIP_UNIX_MODE_BLOCK_DEVICE", 286 "PURE_E_ZIP_UNIX_MODE_CHARACTER_DEVICE", 287 "PURE_E_ZIP_UNIX_MODE_FIFO", 288 "PURE_E_ZIP_UNIX_MODE_SOCKET", 289 "PURE_E_ZIP_UNIX_MODE_PERMISSIONS_STICKY", 290 "PURE_E_ZIP_UNIX_MODE_PERMISSIONS_SETGID", 291 "PURE_E_ZIP_UNIX_MODE_PERMISSIONS_SETUID", 292 "PURE_E_ZIP_DIRECTORY_COMPRESSED", 293 "PURE_E_ZIP_DIRECTORY_UNCOMPRESSED", 294 "PURE_E_ZIP_SYMLINK_COMPRESSED", 295 "PURE_E_ZIP_SYMLINK_LENGTH", 296 "PURE_E_ZIP_SYMLINK_CONTROL_CHARACTERS", 297 "PURE_E_ZIP_SYMLINK_TRAVERSAL_DRIVE_PATH", 298 "PURE_E_ZIP_SYMLINK_TRAVERSAL_RELATIVE_PATH", 299 "PURE_E_ZIP_SYMLINK_TRAVERSAL_DOUBLE_DOTS", 300 "PURE_E_ZIP_SYMLINK_COMPONENT_OVERFLOW", 301 "PURE_E_ZIP_STRING_MAX", 302 "PURE_E_ZIP_STRING_NULL_BYTE", 303 "PURE_E_ZIP_INFLATE", 304 "PURE_E_ZIP_INFLATE_DICTIONARY", 305 "PURE_E_ZIP_INFLATE_STREAM", 306 "PURE_E_ZIP_INFLATE_DATA", 307 "PURE_E_ZIP_INFLATE_MEMORY", 308 "PURE_E_ZIP_INFLATE_COMPRESSED_UNDERFLOW", 309 "PURE_E_ZIP_INFLATE_UNCOMPRESSED_UNDERFLOW", 310 "PURE_E_ZIP_AD_NIHILO", 311 "PURE_E_ZIP_EX_NIHILO", 312 "PURE_E_ZIP_CRC32", 313 "PURE_E_ZIP_EOCDL_64_OVERFLOW", 314 "PURE_E_ZIP_EOCDL_64_SIGNATURE", 315 "PURE_E_ZIP_EOCDL_64_NEGATIVE_OFFSET", 316 "PURE_E_ZIP_EOCDL_64_DISK", 317 "PURE_E_ZIP_EOCDL_64_DISKS", 318 "PURE_E_ZIP_EOCDR_64_OVERFLOW", 319 "PURE_E_ZIP_EOCDR_64_SIGNATURE", 320 "PURE_E_ZIP_EOCDR_EOCDL_64_OVERFLOW", 321 "PURE_E_ZIP_EOCDR_EOCDL_64_UNDERFLOW_ZEROED", 322 "PURE_E_ZIP_EOCDR_EOCDL_64_UNDERFLOW_BUFFER_BLEED", 323 "PURE_E_ZIP_DIFF_EOCDR_DISK", 324 "PURE_E_ZIP_DIFF_EOCDR_CD_DISK", 325 "PURE_E_ZIP_DIFF_EOCDR_CD_DISK_RECORDS", 326 "PURE_E_ZIP_DIFF_EOCDR_CD_RECORDS", 327 "PURE_E_ZIP_DIFF_EOCDR_CD_SIZE", 328 "PURE_E_ZIP_DIFF_EOCDR_CD_OFFSET", 329 "PURE_E_ZIP_EIEF_64_COMPRESSED_SIZE", 330 "PURE_E_ZIP_EIEF_64_DISK", 331 "PURE_E_ZIP_EIEF_64_RELATIVE_OFFSET", 332 "PURE_E_ZIP_EIEF_64_UNCOMPRESSED_SIZE", 333 "PURE_E_ZIP_EIEF_64_UNDERFLOW_ZEROED", 334 "PURE_E_ZIP_EIEF_64_UNDERFLOW_BUFFER_BLEED", 335 "PURE_E_ZIP_EIEF_64_LFH", 336 "PURE_E_ZIP_DIRECTORY_HAS_NO_LFH" 337 }; 338 339 const char* const PURE_E_STRINGS[] = { 340 "file is pure", 341 "exceeded 64 GB limit", 342 "insufficient memory", 343 "string not found", 344 "uint64_t overflow", 345 "zip bomb: too many archives", 346 "zip bomb: too much recursion", 347 "zip bomb: local file header overlap (see research by David Fifield)", 348 "zip bomb: too many files", 349 "zip bomb: dangerous compression ratio and uncompressed size", 350 "zip bomb: compressed data is larger than compressed size (overflow)", 351 "zip bomb: uncompressed data is larger than uncompressed size (overflow)", 352 "zip file too small (minimum size is 22 bytes)", 353 "unsupported: zip file exceeds 4 GB limit (ZIP64)", 354 "not a zip file (malicious rar)", 355 "not a zip file (malicious tar)", 356 "not a zip file (malicious xar)", 357 "not a zip file (bad signature)", 358 "end of central directory record: not found", 359 "end of central directory record: overflow", 360 "end of central directory record: comment overflow", 361 "end of central directory record: bad signature", 362 "end of central directory record: cd_disk_records != cd_records", 363 "end of central directory record: cd_size too small for number of cd_records", 364 "end of central directory record: cd_size > 0 but cd_records == 0", 365 "unsupported: multiple disks", 366 "zip file has appended data (zeroed)", 367 "zip file has appended data (buffer bleed)", 368 "zip file has prepended data", 369 "zip file has prepended data (zeroed)", 370 "zip file has prepended data (buffer bleed)", 371 "central directory header: overflow", 372 "central directory header: bad signature", 373 "central directory header: relative offset overflow", 374 "central directory header: relative offset overlaps central directory", 375 "central directory header: file name overflow", 376 "central directory header: extra field overflow", 377 "central directory header: file comment overflow", 378 "local file header: overflow", 379 "local file header: bad signature", 380 "local file header: file name overflow", 381 "local file header: extra field overflow", 382 "local file header: gap (zeroed)", 383 "local file header: gap (buffer bleed)", 384 "local file header: data overflow", 385 "data descriptor record: overflow", 386 "zip file has overlap between last local file and central directory", 387 "zip file has gap between last local file and central directory (zeroed)", 388 "zip file has gap between last local file and central directory (buffer bleed)", 389 "central directory: overflow", 390 "central directory: underflow (zeroed)", 391 "central directory: underflow (buffer bleed)", 392 "central directory overlaps end of central directory record", 393 "zip file has gap between central directory and end of central directory record (zeroed)", 394 "zip file has gap between central directory and end of central directory record (buffer bleed)", 395 "local file header diverges from central directory header: general purpose bit flag", 396 "local file header diverges from central directory header: compression method", 397 "local file header diverges from central directory header: last mod file time", 398 "local file header diverges from central directory header: last mod file date", 399 "local file header diverges from central directory header: crc32", 400 "local file header diverges from central directory header: compressed size", 401 "local file header diverges from central directory header: uncompressed size", 402 "local file header diverges from central directory header: file name length", 403 "local file header diverges from central directory header: file name", 404 "local file header diverges from data descriptor record: crc32", 405 "local file header diverges from data descriptor record: compressed size", 406 "local file header diverges from data descriptor record: uncompressed size", 407 "data descriptor record diverges from central directory header: crc32", 408 "data descriptor record diverges from central directory header: compressed size", 409 "data descriptor record diverges from central directory header: uncompressed size", 410 "general purpose bit flag: 16-bit overflow", 411 "unsupported: traditional encryption", 412 "unsupported: enhanced deflate", 413 "unsupported: compressed patched data", 414 "unsupported: strong encryption", 415 "unsupported: unused flag (bit 7)", 416 "unsupported: unused flag (bit 8)", 417 "unsupported: unused flag (bit 9)", 418 "unsupported: unused flag (bit 10)", 419 "unsupported: enhanced compression", 420 "unsupported: masked local headers", 421 "unsupported: reserved flag (bit 14)", 422 "unsupported: reserved flag (bit 15)", 423 "compression method: exceeds 999 (CVE-2016-9844)", 424 "compression method: encrypted", 425 "compression method: must be 0 or 8", 426 "file stored with no compression has mismatching compressed and uncompressed sizes", 427 "dangerous negative compression ratio (CVE-2018-18384)", 428 "time: 16-bit overflow", 429 "time: ms-dos hour: overflow", 430 "time: ms-dos minute: overflow", 431 "time: ms-dos second: overflow", 432 "date: 16-bit overflow", 433 "date: ms-dos year: overflow", 434 "date: ms-dos month: overflow", 435 "date: ms-dos day: overflow", 436 "file name exceeds 4096 bytes (CVE-2018-1000035)", 437 "file name contains control characters (CVE-2003-0282)", 438 "directory traversal (via file name drive path)", 439 "directory traversal (via file name relative path)", 440 "directory traversal (via file name double dots)", 441 "file name path component exceeds 255 bytes", 442 "file name contains backslash", 443 "extra field length exceeds maximum", 444 "extra field length must be 0 or at least 4 bytes", 445 "extra field: attribute overflow", 446 "extra field: overflow", 447 "extra field: underflow (zeroed)", 448 "extra field: underflow (buffer bleed)", 449 "extra field: unicode path overflow", 450 "extra field: unicode path has an invalid version", 451 "extra field: unicode path diverges from file name", 452 "unix mode: overflow", 453 "unix mode: dangerous type (block device)", 454 "unix mode: dangerous type (character device)", 455 "unix mode: dangerous type (fifo)", 456 "unix mode: dangerous type (socket)", 457 "unix mode: dangerous permissions (sticky)", 458 "unix mode: dangerous permissions (setgid)", 459 "unix mode: dangerous permissions (setuid)", 460 "directory: non-zero compressed size", 461 "directory: non-zero uncompressed size", 462 "unsupported: compressed symlink", 463 "symlink exceeds 4096 bytes (CVE-2018-1000035)", 464 "symlink contains control characters (CVE-2003-0282)", 465 "directory traversal (via symlink drive path)", 466 "directory traversal (via symlink relative path)", 467 "directory traversal (via symlink double dots)", 468 "symlink path component exceeds 255 bytes", 469 "string exceeds reasonable limit (PURE_ZIP_STRING_MAX)", 470 "string contains a dangerous null byte", 471 "zip file could not be uncompressed", 472 "zip file could not be uncompressed (dictionary error)", 473 "zip file could not be uncompressed (stream error)", 474 "zip file could not be uncompressed (data error)", 475 "zip file could not be uncompressed (memory error)", 476 "compressed data is smaller than compressed size", 477 "uncompressed data is smaller than uncompressed size", 478 "file has a zero uncompressed size but a non-zero compressed size or invalid compressed data (ad nihilo)", 479 "file has a zero compressed size but a non-zero uncompressed size (ex nihilo)", 480 "file is corrupt or has an invalid crc32 checksum", 481 "zip64 end of central directory locator: overflow", 482 "zip64 end of central directory locator: bad signature", 483 "zip64 end of central directory locator: negative offset", 484 "zip64 end of central directory locator: disk != 0", 485 "zip64 end of central directory locator: disks > 1", 486 "zip64 end of central directory record: overflow", 487 "zip64 end of central directory record: bad signature", 488 "zip64 eocdr overlaps zip64 eocdl", 489 "gap between zip64 eocdr and zip64 eocdl (zeroed)", 490 "gap between zip64 eocdr and zip64 eocdl (buffer bleed)", 491 "eocdr diverges from zip64 eocdr: disk", 492 "eocdr diverges from zip64 eocdr: cd_disk", 493 "eocdr diverges from zip64 eocdr: cd_disk_records", 494 "eocdr diverges from zip64 eocdr: cd_records", 495 "eocdr diverges from zip64 eocdr: cd_size", 496 "eocdr diverges from zip64 eocdr: cd_offset", 497 "zip64 extended information extra field: missing compressed_size", 498 "zip64 extended information extra field: missing disk", 499 "zip64 extended information extra field: missing relative_offset", 500 "zip64 extended information extra field: missing uncompressed_size", 501 "zip64 extended information extra field: appended data (zeroed)", 502 "zip64 extended information extra field: appended data (buffer bleed)", 503 "zip64 extended information extra field: local file header must include both uncompressed_size and compressed_size", 504 "a directory has no local file header" 505 };