| 29 | |
| 30 | namespace { |
| 31 | static uint32_t read_be32(const uint8_t* ptr) { |
| 32 | return (static_cast<uint32_t>(ptr[0]) << 24) | |
| 33 | (static_cast<uint32_t>(ptr[1]) << 16) | |
| 34 | (static_cast<uint32_t>(ptr[2]) << 8) | |
| 35 | static_cast<uint32_t>(ptr[3]); |
| 36 | } |
| 37 | |
| 38 | static bool has_valid_png_structure(const uint8_t* data, size_t size) { |
| 39 | if (!data || size < 8) { |
no outgoing calls
no test coverage detected