| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes GH-6256
|
|
|
|
|
| |
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Make MAX_IFD_NESTING_LEVEL an actual nesting level
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
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
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #75785 by attempt switching endianness on Maker's Note
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
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.
|
| | |
| | |
| | |
| | | |
Closes GH-5958
|
| | |
| | |
| | |
| | | |
Closes GH-5950
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fix warnings and error when compiling with EXIF_DEBUG defined.
Closes GH-5838.
|
| | |
| | |
| | |
| | | |
Closes GH-5758
|
| | |
| | |
| | |
| | | |
Closes GH-5779
|
| | |
| | |
| | |
| | | |
Closes GH-5759
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.
This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.
Closes GH-5739.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
And clean up this function a bit by reducing indentation and
variable scope.
|
| | |
| | |
| | |
| | | |
We are okay with the loss of precision here...
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #79336
|
| | |
| | |
| | |
| | | |
Make reading of floats and doubles host-endian independent.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
| | |
| | |
| | |
| | | |
Closes GH-5347
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.4:
[ci skip] Update NEWS
Fix test
Fix bug #79329 - get_headers should not accept \0
Fixed bug #79282
Fix #79283: Segfault in libmagic patch contains a buffer overflow
Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
[ci skip] Update NEWS
Fix test
Fix bug #79329 - get_headers should not accept \0
Fixed bug #79282
Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
var_dump() is debugging functionality, so it should print
floating-point numbers accurately. We do this by switching
to serialize_precision, which (by default) will print with
as much precision as necessary to preserve the exact value
of the float.
This also affects debug_zval_dump().
Closes GH-5172.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
|
| | | |
|
| | |
| | |
| | |
| | | |
extensions
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79046
|
| | | |
|