php-src/ext/spl
Christoph M. Becker 976e71a2fa
Fix #80933: SplFileObject::DROP_NEW_LINE is broken for NUL and CR
`buf` may contain NUL bytes, so we must not use `strcspn()` but rather
a binary safe variant.  However, we also must not detect a stray CR as
line ending, and since we only need to check line endings at the end
of the buffer, we can nicely optimize.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

Closes GH-6836.
2021-04-13 16:49:06 +02:00
..
tests Fix #80933: SplFileObject::DROP_NEW_LINE is broken for NUL and CR 2021-04-13 16:49:06 +02:00
config.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
config.w32 Remove HAVE_* for always available extensions 2019-04-14 11:44:12 -03:00
CREDITS Change some permissions from 755 to 644 2018-08-28 23:26:49 +02:00
php_spl.c Add zpp check to spl_classes() 2019-09-03 09:50:08 +02:00
php_spl.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_array.c Fixed bug #80719 2021-02-11 16:12:06 +01:00
spl_array.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_directory.c Fix #80933: SplFileObject::DROP_NEW_LINE is broken for NUL and CR 2021-04-13 16:49:06 +02:00
spl_directory.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_dllist.c Fix #69264: __debugInfo() ignored while extending SPL classes 2020-04-06 12:01:29 +02:00
spl_dllist.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_engine.c Remove local variables 2019-02-03 21:03:00 +01:00
spl_engine.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_exceptions.c Remove local variables 2019-02-03 21:03:00 +01:00
spl_exceptions.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_fixedarray.c Merge branch 'PHP-7.3' into PHP-7.4 2020-03-23 13:31:25 +01:00
spl_fixedarray.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_functions.c Remove local variables 2019-02-03 21:03:00 +01:00
spl_functions.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_heap.c SplHeap: Avoid memcpy on overlapping pointer 2020-06-21 22:53:46 +02:00
spl_heap.h Remove local variables 2019-02-03 21:03:00 +01:00
spl_iterators.c Add missing initialization check to RegexIterator::getRegex() 2020-08-14 10:41:36 +02:00
spl_iterators.h Remove HAVE_PCRE/HAVE_BUNDLED_PCRE checks 2019-03-22 10:29:18 +01:00
spl_observer.c Fix #69264: __debugInfo() ignored while extending SPL classes 2020-04-06 12:01:29 +02:00
spl_observer.h Remove local variables 2019-02-03 21:03:00 +01:00