This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 85375ef6c62a32f40443803cfba409e0b4e56ae5 (commit) via 37c29279ba0395d957597f60325545fba9d4fcf2 (commit) from 254ab1bb2cf59cfef000a55e64837a89e35e4008 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/85375ef6c62a32f40443803cfba409e0b4e56...
commit 85375ef6c62a32f40443803cfba409e0b4e56ae5 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 17:50:58 2015 +0100
loaders: Exif: Fix rational loading
Arrays are TODO!
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_Exif.c b/libs/loaders/GP_Exif.c index e11f72e..04b3d85 100644 --- a/libs/loaders/GP_Exif.c +++ b/libs/loaders/GP_Exif.c @@ -186,29 +186,15 @@ add: static int load_rat(GP_IO *io, GP_DataStorage *storage, GP_DataNode *node, const char *id, uint32_t num_comp, uint32_t val) { - (void)io;(void)storage;(void)node;(void)id;(void)num_comp;(void)val; - return GP_DataStorageAddRational(storage, node, id, 0, 0) != NULL; -} - -/* -static int rat_num(void *buf, uint32_t offset, size_t buf_len, int swap) -{ - int ret; + size_t max_comps = GP_MIN(num_comp, 32u); + uint32_t buf[2 * max_comps];
- GET_32(ret, buf, offset, buf_len, swap); - - return ret; -} - -static int rat_den(void *buf, uint32_t offset, size_t buf_len, int swap) -{ - int ret; - - GET_32(ret, buf, offset + 4, buf_len, swap); + if (get_buf(io, val + 6, (void*)buf, num_comp * 8)) + return 1;
- return ret; + //TODO: Data Storage needs array + return GP_DataStorageAddRational(storage, node, id, buf[0], buf[1]) != NULL; } -*/
static int load_tag(GP_IO *io, GP_DataStorage *storage, GP_DataNode* node, const struct IFD_tags *taglist, @@ -228,6 +214,7 @@ static int load_tag(GP_IO *io, GP_DataStorage *storage, "expected '%s' in %s block", res->name, IFD_format_name(format), format, IFD_format_name(res->format), taglist->id); + //TODO: Load and convert! }
if ((res->num_components != 0) &&
http://repo.or.cz/w/gfxprim.git/commit/37c29279ba0395d957597f60325545fba9d4f...
commit 37c29279ba0395d957597f60325545fba9d4fcf2 Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 8 17:42:44 2015 +0100
loaders: Exif: Limit number of subrecords
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_Exif.c b/libs/loaders/GP_Exif.c index 0cfd591..e11f72e 100644 --- a/libs/loaders/GP_Exif.c +++ b/libs/loaders/GP_Exif.c @@ -324,7 +324,7 @@ static int load_IFD(GP_IO *io, GP_DataStorage *storage, GP_DataNode *node, GP_DEBUG(2, "-- IFD Offset 0x%08x Entries %04u --", IFD_offset, IFD_entries_count);
- struct IFD_subrecord subrecs[IFD_entries_count]; + struct IFD_subrecord subrecs[4]; unsigned int subrec_cnt = 0;
for (i = 0; i < IFD_entries_count; i++) { @@ -346,6 +346,10 @@ static int load_IFD(GP_IO *io, GP_DataStorage *storage, GP_DataNode *node, case IFD_EXIF_OFFSET: case IFD_GPS_OFFSET: case IFD_INTEROPERABILITY_OFFSET: + if (subrec_cnt >= GP_ARRAY_SIZE(subrecs)) { + GP_WARN("Too much subrecords, skipping one"); + continue; + } subrecs[subrec_cnt].tag = tag; subrecs[subrec_cnt].offset = val; subrec_cnt++;
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_Exif.c | 33 ++++++++++++--------------------- 1 files changed, 12 insertions(+), 21 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.