Branch Coverage

imexif.c
Criterion Covered Total %
branch 0 200 0.0


line true false branch
294 0 0 if (!tiff_init(&tiff, data, length)) {
298 0 0 if (!tiff_load_ifd(&tiff, tiff.first_ifd_offset)) {
306 0 0 if (exif_ifd_offset) {
307 0 0 if (tiff_load_ifd(&tiff, exif_ifd_offset)) {
315 0 0 if (gps_ifd_offset) {
316 0 0 if (tiff_load_ifd(&tiff, gps_ifd_offset)) {
398 0 0 for (tag_index = 0, entry = tiff->ifd;
402 0 0 if (tiff_get_tag_int(tiff, tag_index, &work))
407 0 0 if (tiff_get_tag_int(tiff, tag_index, &work))
687 0 0 for (tag_index = 0, entry = tiff->ifd;
696 0 0 for (i = 0; i < entry->size && i < 8; ++i) {
0 0 for (i = 0; i < entry->size && i < 8; ++i) {
697 0 0 if (user_comment[i] == '\0')
701 0 0 while (i < entry->size && user_comment[i])
0 0 while (i < entry->size && user_comment[i])
731 0 0 if (maker_note_offset) {
848 0 0 if (length < 8) /* well... would have to be much bigger to be useful */
850 0 0 if (data[0] == 'M' && data[1] == 'M')
0 0 if (data[0] == 'M' && data[1] == 'M')
852 0 0 else if (data[0] == 'I' && data[1] == 'I')
0 0 else if (data[0] == 'I' && data[1] == 'I')
858 0 0 if (version != 42)
862 0 0 if (tiff->first_ifd_offset > length || tiff->first_ifd_offset < 8)
0 0 if (tiff->first_ifd_offset > length || tiff->first_ifd_offset < 8)
915 0 0 if (offset + (2+12+4) > tiff->size) {
924 0 0 if (offset + ifd_size > tiff->size) {
932 0 0 for (i = 0; i < count; ++i) {
937 0 0 if (entry->type >= 1 && entry->type <= ift_last) {
0 0 if (entry->type >= 1 && entry->type <= ift_last) {
940 0 0 if (entry->size / entry->item_size != entry->count) {
945 0 0 else if (entry->size <= 4) {
950 0 0 if (entry->offset + entry->size > tiff->size) {
986 0 0 if (tiff->ifd_size && tiff->ifd) {
0 0 if (tiff->ifd_size && tiff->ifd) {
1014 0 0 if (index < 0 || index >= tiff->ifd_size) {
0 0 if (index < 0 || index >= tiff->ifd_size) {
1020 0 0 if (array_index < 0 || array_index >= entry->count) {
0 0 if (array_index < 0 || array_index >= entry->count) {
1079 0 0 if (index < 0 || index >= tiff->ifd_size) {
0 0 if (index < 0 || index >= tiff->ifd_size) {
1085 0 0 if (entry->count != 1) {
1111 0 0 if (index < 0 || index >= tiff->ifd_size) {
0 0 if (index < 0 || index >= tiff->ifd_size) {
1117 0 0 if (array_index < 0 || array_index >= entry->count) {
0 0 if (array_index < 0 || array_index >= entry->count) {
1168 0 0 if (index < 0 || index >= tiff->ifd_size) {
0 0 if (index < 0 || index >= tiff->ifd_size) {
1174 0 0 if (entry->count != 1) {
1205 0 0 for (tag_index = 0, entry = tiff->ifd;
1207 0 0 for (i = 0; i < map_count; ++i) {
1209 0 0 if (map[i].tag == entry->tag
1210 0 0 && tiff_get_tag_int(tiff, tag_index, &value)) {
1231 0 0 for (tag_index = 0, entry = tiff->ifd;
1233 0 0 for (i = 0; i < map_count; ++i) {
1235 0 0 if (map[i].tag == entry->tag
1236 0 0 && tiff_get_tag_double(tiff, tag_index, &value)) {
1257 0 0 for (tag_index = 0, entry = tiff->ifd;
1259 0 0 for (i = 0; i < map_count; ++i) {
1260 0 0 if (map[i].tag == entry->tag) {
1261 0 0 int len = entry->type == ift_ascii ? entry->size - 1 : entry->size;
1287 0 0 for (tag_index = 0, entry = tiff->ifd;
1289 0 0 for (i = 0; i < map_count; ++i) {
1290 0 0 if (map[i].tag == entry->tag && entry->count <= MAX_ARRAY_VALUES) {
0 0 if (map[i].tag == entry->tag && entry->count <= MAX_ARRAY_VALUES) {
1291 0 0 if (entry->type == ift_rational || entry->type == ift_srational) {
0 0 if (entry->type == ift_rational || entry->type == ift_srational) {
1296 0 0 for (j = 0; j < entry->count; ++j) {
1297 0 0 if (!tiff_get_tag_double_array(tiff, tag_index, &value, j)) {
1301 0 0 if (len >= sizeof(workstr) - 1) {
1305 0 0 if (j) {
1318 0 0 else if (entry->type == ift_short || entry->type == ift_long
0 0 else if (entry->type == ift_short || entry->type == ift_long
1319 0 0 || entry->type == ift_sshort || entry->type == ift_slong
0 0 || entry->type == ift_sshort || entry->type == ift_slong
1320 0 0 || entry->type == ift_byte) {
1325 0 0 for (j = 0; j < entry->count; ++j) {
1326 0 0 if (!tiff_get_tag_int_array(tiff, tag_index, &value, j)) {
1330 0 0 if (len >= sizeof(workstr) - 1) {
1334 0 0 if (j) {
1369 0 0 for (tag_index = 0, entry = tiff->ifd;
1371 0 0 for (i = 0; i < map_count; ++i) {
1373 0 0 if (map[i].tag == entry->tag
1374 0 0 && tiff_get_tag_int(tiff, tag_index, &value)) {
1376 0 0 for (j = 0; j < map[i].map_count; ++j) {
1377 0 0 if (value == map[i].map[j].tag) {
1382 0 0 if (found) {
1415 0 0 if (offset + 2 > tiff->size) {
1421 0 0 if (tiff->type == tt_intel)
1437 0 0 if (offset + 4 > tiff->size) {
1443 0 0 if (tiff->type == tt_intel)
1489 0 0 if (offset + 2 > tiff->size) {
1495 0 0 if (tiff->type == tt_intel)
1500 0 0 if (result > 0x7FFF)
1518 0 0 if (offset + 4 > tiff->size) {
1524 0 0 if (tiff->type == tt_intel)
1532 0 0 if (work > 0x7FFFFFFFUL)
1549 0 0 if (offset + 8 > tiff->size) {
1558 0 0 if (denom == 0) {
1576 0 0 if (offset + 8 > tiff->size) {
1585 0 0 if (denom == 0) {