https://bugzilla.wikimedia.org/show_bug.cgi?id=55541

Tim Starling <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Tim Starling <[email protected]> ---
I have the file. It is an interesting bug. The pointer offset_base is
deliberately assigned a value before the start of its associated buffer. It is
a kind of virtual start-of-file pointer -- when you add a file offset to
offset_base, you get a pointer to the memory that holds the file data at that
offset.

The bug occurs when the IFD offset is larger than the heap address for the file
buffer. This only happens when both the heap address is small (e.g. if it is
allocated from brk()) and the IFD offset is large. In this case, offset_base
wraps around past the start of the address space and becomes a large positive
pointer. This is mostly harmless, except for when a tag value is located so far
before the start of the IFD that its virtual pointer also wraps around to a
large positive value. Then in exif_process_IFD_TAG():

if (byte_count > IFDlength || offset_val > IFDlength-byte_count || value_ptr <
dir_entry) {

The "value_ptr < dir_entry" condition should be true, because the value is
before the IFD in the file, but because value_ptr has wrapped around and
dir_entry hasn't, it is false. So this code incorrectly assumes that value_ptr
is inside the already-loaded buffer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to