diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-23 13:34:59 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-06-23 13:56:32 +0200 |
commit | 4f57070e272f506731557b35b484429a968c7dd2 (patch) | |
tree | 7e9502ad265f58e07c46c3a124b0d13755c7bf92 /fiv-io.c | |
parent | 2dc4e9c13b33ae38099f159a9fd87b4c8ea31978 (diff) | |
download | fiv-4f57070e272f506731557b35b484429a968c7dd2.tar.gz fiv-4f57070e272f506731557b35b484429a968c7dd2.tar.xz fiv-4f57070e272f506731557b35b484429a968c7dd2.zip |
Fix 32-bit build warnings
Diffstat (limited to 'fiv-io.c')
-rw-r--r-- | fiv-io.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1263,7 +1263,7 @@ parse_mpf_index_ifd(struct tiffer *T) static bool parse_mpf( - GPtrArray *individuals, const uint8_t *mpf, size_t len, const uint8_t *end) + GPtrArray *individuals, const uint8_t *mpf, size_t len, size_t total_len) { struct tiffer T; if (!tiffer_init(&T, mpf, len) || !tiffer_next_ifd(&T)) @@ -1274,7 +1274,7 @@ parse_mpf( uint32_t *offsets = parse_mpf_index_ifd(&T); if (offsets) { for (const uint32_t *o = offsets; *o; o++) - if (*o <= end - mpf) + if (*o <= total_len) g_ptr_array_add(individuals, (gpointer) mpf + *o); free(offsets); } @@ -1378,7 +1378,7 @@ parse_jpeg_metadata(const char *data, size_t len, struct jpeg_metadata *meta) if (meta->mpf && marker == APP2 && p - payload >= 8 && !memcmp(payload, "MPF\0", 4) && !meta->mpf->len) { payload += 4; - parse_mpf(meta->mpf, payload, p - payload, end); + parse_mpf(meta->mpf, payload, p - payload, end - payload); } // TODO(p): Extract the main XMP segment. |