Lines Matching refs:size
342 uint8_t size [ 4];
368 uint8_t size [4];
389 if (tag.type != skcms_Signature_sf32 || tag.size < SAFE_SIZEOF(sf32_Layout)) {
413 if (tag->type != skcms_Signature_XYZ || tag->size < SAFE_SIZEOF(XYZ_Layout)) {
446 static bool read_curve_para(const uint8_t* buf, uint32_t size,
448 if (size < SAFE_FIXED_SIZE(para_Layout)) {
461 if (size < SAFE_FIXED_SIZE(para_Layout) + curve_bytes[function_type]) {
522 static bool read_curve_curv(const uint8_t* buf, uint32_t size,
524 if (size < SAFE_FIXED_SIZE(curv_Layout)) {
531 if (size < SAFE_FIXED_SIZE(curv_Layout) + value_count * SAFE_SIZEOF(uint16_t)) {
563 // Parses both curveType and parametricCurveType data. Ensures that at most 'size' bytes are read.
565 static bool read_curve(const uint8_t* buf, uint32_t size,
567 if (!buf || size < 4 || !curve) {
573 return read_curve_para(buf, size, curve, curve_size);
575 return read_curve_curv(buf, size, curve, curve_size);
717 if (tag->size < SAFE_FIXED_SIZE(mft1_Layout)) {
729 return init_tables(mftTag->variable, tag->size - SAFE_FIXED_SIZE(mft1_Layout), 1,
735 if (tag->size < SAFE_FIXED_SIZE(mft2_Layout)) {
753 return init_tables(mftTag->variable, tag->size - SAFE_FIXED_SIZE(mft2_Layout), 2,
757 static bool read_curves(const uint8_t* buf, uint32_t size, uint32_t curve_offset,
760 if (curve_offset > size) {
765 if (!read_curve(buf + curve_offset, size - curve_offset, &curves[i], &curve_bytes)) {
806 if (tag->size < SAFE_SIZEOF(mAB_or_mBA_Layout)) {
835 if (!read_curves(tag->buf, tag->size, b_curve_offset, a2b->output_channels,
846 if (!read_curves(tag->buf, tag->size, m_curve_offset, a2b->matrix_channels,
852 if (tag->size < matrix_offset + 12 * SAFE_SIZEOF(uint32_t)) {
881 if (!read_curves(tag->buf, tag->size, a_curve_offset, a2b->input_channels,
886 if (tag->size < clut_offset + SAFE_FIXED_SIZE(CLUT_Layout)) {
910 if (tag->size < clut_offset + SAFE_FIXED_SIZE(CLUT_Layout) + grid_size) {
933 if (tag->size < SAFE_SIZEOF(mAB_or_mBA_Layout)) {
961 if (!read_curves(tag->buf, tag->size, b_curve_offset, b2a->input_channels,
973 if (!read_curves(tag->buf, tag->size, m_curve_offset, b2a->matrix_channels,
978 if (tag->size < matrix_offset + 12 * SAFE_SIZEOF(uint32_t)) {
1008 if (!read_curves(tag->buf, tag->size, a_curve_offset, b2a->output_channels,
1013 if (tag->size < clut_offset + SAFE_FIXED_SIZE(CLUT_Layout)) {
1036 if (tag->size < clut_offset + SAFE_FIXED_SIZE(CLUT_Layout) + grid_size) {
1185 if (tag->type != skcms_Signature_cicp || tag->size < 12) {
1201 tag->size = read_big_u32(tags[idx].size);
1212 tag->size = read_big_u32(tags[i].size);
1243 profile->size = read_big_u32(header->size);
1253 // Validate signature, size (smaller than buffer, large enough to hold tag table),
1257 profile->size > len ||
1258 profile->size < SAFE_SIZEOF(header_Layout) + tag_table_size ||
1270 // Validate that all tag entries have sane offset + size
1274 uint32_t tag_size = read_big_u32(tags[i].size);
1276 if (tag_size < 4 || tag_end > profile->size) {
1291 if (!read_curve(kTRC.buf, kTRC.size, &profile->trc[0], nullptr)) {
1310 if (!read_curve(rTRC.buf, rTRC.size, &profile->trc[0], nullptr) ||
1311 !read_curve(gTRC.buf, gTRC.size, &profile->trc[1], nullptr) ||
1312 !read_curve(bTRC.buf, bTRC.size, &profile->trc[2], nullptr)) {
1379 0, // size, moot here
1474 0, // size, moot here
2047 // operations that are variable size.
2638 // We can't transform in place unless the PixelFormats are the same size.