summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_auth.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-17 12:21:05 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-02-18 15:17:38 +0100
commit7a062cf9cdb5f037413836537c4b38bb7d30ee68 (patch)
tree119dc79c8dcc7e24d23e2161be3b1df3d79774d1 /ext/mysqlnd/mysqlnd_auth.c
parent3b08f53c97b2aa1bdd132d0f715e9db20fefad5d (diff)
downloadphp-git-7a062cf9cdb5f037413836537c4b38bb7d30ee68.tar.gz
Handle EXIF offsets in a principled manner
exif_process_IFD_TAG() currently accepts a dir_entry, offset_base and IFDlength. However, it's very hard to follow how these values are related to each other and the addressable memory region. As we add additional bounds check, this gets further confused. One of the basic cases is where dir_entry is in [offset_base, offset_base+IFDlength), in which case the memory [dir_entry, offset_base+IFDlength) is valid, but the memory [offset_base, dir_entry) is not necessarily valid. I wasn't able to understand what exactly is valid if dir_entry is outside [offset_base, offset_base+IFDlength) This patch changes everything to use a struct that separately stores offset_base and the valid memory region and adds helpers to fetch offsets and check that pointers are in-bounds. Closes GH-5068.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_auth.c')
0 files changed, 0 insertions, 0 deletions