History log of /PHP-8.0/ext/exif/exif.c (Results 1 – 25 of 451)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# c5401854 18-Sep-2020 Nikita Popov

Run tidy

This should fix most of the remaining issues with tabs and spaces
being mixed in tests.


Revision tags: php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1
# 7e339a33 08-Sep-2020 Nikita Popov

Make null byte error a ValueError

Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do t

Make null byte error a ValueError

Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.

This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.

Closes GH-6094.

show more ...


# 259af931 08-Sep-2020 Nikita Popov

Promote warnings in exif

The only thing that can promoted are the path-related checked.
Everything else is input dependent and error-suppressing these
functions is both the typical a

Promote warnings in exif

The only thing that can promoted are the path-related checked.
Everything else is input dependent and error-suppressing these
functions is both the typical and the recommended usage.

show more ...


# d1ac7e3a 07-Sep-2020 Nikita Popov

Remove some unnecessary HAVE_EXTNAME guards

A recurring pattern in old extension: Putting the whole source
code behind HAVE_EXTNAME. This is pointless, as the code is only
compiled i

Remove some unnecessary HAVE_EXTNAME guards

A recurring pattern in old extension: Putting the whole source
code behind HAVE_EXTNAME. This is pointless, as the code is only
compiled if the extension is enabled.

This removes a couple of them, but not all.

show more ...


Revision tags: php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1
# 376bbbdf 12-Aug-2020 Nikita Popov

Make MAX_IFD_NESTING_LEVEL an actual nesting level

Currently we only ever increment ifd_nesting_level, so this ends up
being a limit on the total number of IFD tags and we regularly get

Make MAX_IFD_NESTING_LEVEL an actual nesting level

Currently we only ever increment ifd_nesting_level, so this ends up
being a limit on the total number of IFD tags and we regularly get
bug reports of it being exceeded. I think the intention behind this
limit was to prevent recursion stack overflow, and for that we only
need to check actual recursive usage. I've implemented that here,
and dropped the nesting limit down to a smaller value
(which still passes our tests).

However, it seems that we do also need to have a total limit on
the number of tags, as we don't catch some instances of infinite
looping otherwise. Add this as a separate limit with a higher
value, that should hopefully be sufficient.

This is expected to fix a number of bugs:

https://bugs.php.net/bug.php?id=78083
https://bugs.php.net/bug.php?id=78701
https://bugs.php.net/bug.php?id=79907
https://bugs.php.net/bug.php?id=80016

show more ...


Revision tags: php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1
# 2fa4ca95 12-Jul-2020 Nawarian

Fix bug #75785 by attempt switching endianness on Maker's Note

Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big ref

Fix bug #75785 by attempt switching endianness on Maker's Note

Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big refactor and a gigantic lookup
table, this commit simply attempts to switch the
endianness and proceed when values are acceptable.

Closes GH-5849.

show more ...


# e59efb37 13-Jul-2020 Nikita Popov

Put debug function behind ifdef


# 2d98f0ca 13-Jul-2020 Nikita Popov

Restore warning


# 6f48ccf5 10-Jul-2020 Nat Wyatt

Fix compilation errors when EXIF_DEBUG is defined

Fix warnings and error when compiling with EXIF_DEBUG defined.

Closes GH-5838.


Revision tags: php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20
# 2b5de6f8 01-Jul-2020 Max Semenik

Remove proto comments from C files

Closes GH-5758


# 6079bdb2 23-Jun-2020 George Peter Banyard

Use standard bool type in EXIF extension


Revision tags: php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1
# 5621c5fa 13-Jun-2020 Christoph M. Becker

Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes

Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or becaus

Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes

Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or because our
expectations do not quite match reality), there is no need to let
parsing fail; we can still go on parsing the other meta information.

show more ...


# 4f9a1122 12-Jun-2020 Nikita Popov

Avoid out of range float to int cast in exif

Use convert_any_int instead of convert_any_format to directly get
an integer.

Also adjust SRATIONAL handling to not go through a dou

Avoid out of range float to int cast in exif

Use convert_any_int instead of convert_any_format to directly get
an integer.

Also adjust SRATIONAL handling to not go through a double division.
This was introduced to avoid SIGFPE for the INT_MIN / -1 case,
but we can just handle that explicitly.

show more ...


# f68a64a8 12-Jun-2020 Nikita Popov

Fix null pointer UB in add_assoc_image_info()

And clean up this function a bit by reducing indentation and
variable scope.


# ece37505 12-Jun-2020 Nikita Popov

Fix float conversion warning

We are okay with the loss of precision here...


Revision tags: php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# e37501e6 12-May-2020 George Peter Banyard

Fix [-Wundef] warning in EXIF extension


Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1
# 0b709e34 16-Apr-2020 Nikita Popov

Fix bug #79336

Make reading of floats and doubles host-endian independent.


Revision tags: php-7.2.30, php-7.4.5, php-7.3.17
# 7c307873 04-Apr-2020 Máté Kocsis

Generate function entries from stubs for a couple of extensions

Closes GH-5347


Revision tags: php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16
# 9ed82b1f 16-Mar-2020 Stanislav Malyshev

Fixed bug #79282


# b9d32197 16-Mar-2020 Stanislav Malyshev

Fixed bug #79282


# 25238bdf 16-Mar-2020 Stanislav Malyshev

Fixed bug #79282


# 41f66e2a 16-Mar-2020 Stanislav Malyshev

Fixed bug #79282


Revision tags: php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28, php-7.3.15RC1, php-7.4.3RC1, php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26
# 7a062cf9 17-Dec-2019 Nikita Popov

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 rel

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.

show more ...


# 99db00b1 19-Jan-2020 Máté Kocsis

Fix #78880 Another round


# 7b4a4d2a 03-Jan-2020 Máté Kocsis

Use RETURN_THROWS() after try_convert_to_string()


12345678910>>...19