#include "src/codec/SkTiffUtility.h"
#include "include/core/SkData.h"
#include "src/codec/SkCodecPriv.h"
#include <cstddef>
#include <utility>
Go to the source code of this file.
|
static const uint8_t * | get_entry_address (const SkData *data, uint32_t ifdOffset, uint16_t entryIndex) |
|
static bool | validate_ifd (const SkData *data, bool littleEndian, uint32_t ifdOffset, uint16_t *outNumEntries, uint32_t *outNextIfdOffset) |
|
◆ get_entry_address()
static const uint8_t * get_entry_address |
( |
const SkData * |
data, |
|
|
uint32_t |
ifdOffset, |
|
|
uint16_t |
entryIndex |
|
) |
| |
|
static |
Definition at line 53 of file SkTiffUtility.cpp.
55 {
56 return data->bytes() +
57 ifdOffset +
60}
constexpr size_t kSizeShort
constexpr size_t kSizeEntry
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ validate_ifd()
static bool validate_ifd |
( |
const SkData * |
data, |
|
|
bool |
littleEndian, |
|
|
uint32_t |
ifdOffset, |
|
|
uint16_t * |
outNumEntries, |
|
|
uint32_t * |
outNextIfdOffset |
|
) |
| |
|
static |
Definition at line 64 of file SkTiffUtility.cpp.
68 {
69 const uint8_t* dataCurrent =
data->bytes();
70 size_t dataSize =
data->size();
71
72
73 if (dataSize < ifdOffset) {
75 return false;
76 }
77 dataCurrent += ifdOffset;
78 dataSize -= ifdOffset;
79
80
82 SkCodecPrintf(
"Insufficient space to store number of entries.\n");
83 return false;
84 }
88
89
91 SkCodecPrintf(
"Insufficient space (%u) to store all %u entries.\n",
92 static_cast<uint32_t
>(
data->size()),
93 numEntries);
94 return false;
95 }
96
97
98 *outNumEntries = numEntries;
99
100
103
104
106 SkCodecPrintf(
"Insufficient space to store next IFD offset.\n");
107 return false;
108 }
109
110
112 return true;
113}
static uint32_t get_endian_int(const uint8_t *data, bool littleEndian)
static uint16_t get_endian_short(const uint8_t *data, bool littleEndian)
#define SkCodecPrintf(...)
constexpr size_t kSizeLong
◆ kSizeEntry
constexpr size_t kSizeEntry = 12 |
|
constexpr |
◆ kSizeLong
constexpr size_t kSizeLong = 4 |
|
constexpr |
◆ kSizeShort
constexpr size_t kSizeShort = 2 |
|
constexpr |