| 1852 | } |
| 1853 | |
| 1854 | static bool trailer_key_structural(const pdf_kv_t *kv) { |
| 1855 | static const char *const keys[] = {"Prev", "XRefStm", "Type", "W", "Index", |
| 1856 | "Filter", "DecodeParms", "Length", "Size"}; |
| 1857 | for (size_t i = 0; i < sizeof(keys) / sizeof(keys[0]); i++) { |
| 1858 | size_t n = strlen(keys[i]); |
| 1859 | if (kv->klen == n && memcmp(kv->key, keys[i], n) == 0) { |
| 1860 | return true; |
| 1861 | } |
| 1862 | } |
| 1863 | return false; |
| 1864 | } |
| 1865 | |
| 1866 | static bool load_xref(pdf_doc_t *d) { |
| 1867 | const unsigned char *s = d->data; |