1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

423 Commits

Author SHA1 Message Date
Matteo Beccati 6238dd6f32 Fixed bug #63186 (compile failure on netbsd) 2013-06-14 16:51:54 +02:00
Xinchen Hui a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Gustavo Lopes 76601c4fd1 Fix bug #63240 on stream_get_line()
stream_get_line() could contain the delimiter string if that string
had more than one character. The bug manifested itself when a read on
the stream ended with part of the delimiter string and the read after
would start with the rest of the delimiter string; provided that
the data of first read did not complete the max length result of the
call to stream_get_line() with the partial delimiter used in that max
length return. In that case, the delimiter will still appear in
the result, divided in two subsequent return values. That is not a bug.

See <http://www.mail-archive.com/internals@lists.php.net/msg61325.html>
2012-10-12 20:23:43 +02:00
Xinchen Hui 6284ef112e Fixed bug #63236 (Executable permission on various source files) 2012-10-09 13:28:31 +08:00
Stanislav Malyshev fc74503792 improve overflow checks 2012-06-08 01:21:37 -07:00
Stanislav Malyshev 7d04e0fb2e fix potential overflow in _php_stream_scandir 2012-06-07 23:08:35 -07:00
Reeze Xia 3e9923dd8d Fixed Bug #61961 (file_get_content leaks when access empty file with max length) 2012-05-06 18:27:26 +08:00
Gustavo André dos Santos Lopes 0f180a63eb Fixed bug in new stream_get_line() when using NUL as a delimiter.
This is the issue Derick spotted a few days ago..
2012-04-07 16:32:19 +01:00
Gustavo André dos Santos Lopes ef19fba2d5 - Fixed bug #61371 (resource leak). This bug had two parts, a long standing leak
already fixed in trunk/5.3 and now merged onto 5.4 and a leak introduced in
  fixing bug #61115. This better fix for #61115 fixes the leak (the inhibition
  for deleting the context was too broad) and so prevents segfaults in new
  circumstances (where the inhibition was not broad enough).
2012-03-17 19:37:30 +00:00
Gustavo André dos Santos Lopes b976ebad35 - Oops committed old version of the patch in r324020. Fixed. See bug #61253. 2012-03-08 12:39:48 +00:00
Gustavo André dos Santos Lopes f413b3726c - Fixed bug #61253: Wrappers opened with errors concurrency problem
#NOTE: There is a very small possibility that this will further break
#extensions that access wrapper->{err_stack, err_count}. On PECL SVN, rar is the
#only one and it may leak memory after this. I say "further break" because
#extensions that do that are already broken (will segfault) under ZTS, which is
#why this patch is necessary.
#There was what I deem as tacit acceptance from 5.3/5.4 RMs on this.
2012-03-08 12:30:59 +00:00
Gustavo André dos Santos Lopes 02592974b4 - size_t may be shorter than long and definitely is not signed. Note that the
z modifier was only added in C99, so we can't use it.
2012-03-04 19:30:01 +00:00
Ilia Alshanetsky 0fe734b7c8 Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths) 2012-03-03 20:36:14 +00:00
Gustavo André dos Santos Lopes bcefc31e68 - Better fix for #61115.
- Fixed resource leak in stream_socket_client().
2012-02-24 22:56:21 +00:00
Gustavo André dos Santos Lopes eb1ada852d - Fixed bug #61115 (stream related segfault on fatal error in
php_stream_context_link).
#run-tests.php is not currently detecting the segfault in the test
#Missing 5.4 merge
2012-02-22 11:45:26 +00:00
Mateusz Kocielski ddcf55b640 * fixed bug #60704 unlink() bug with some files path
Reviewed by: rasmus@
2012-02-14 14:14:30 +00:00
Gustavo André dos Santos Lopes 45a6f8d9a5 - Further fix for bug #60455 (stream_get_line misbehaves if EOF is not detected
together with the last read).
- Fixed bug #60817 (stream_get_line() reads from stream even when there is
  already sufficient data buffered). stream_get_line() now behaves more like
  fgets(), as is documented.
#withheld commit to 5.4
2012-01-22 20:30:37 +00:00
Felipe Pena e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov ce52784052 Initialize structure (some fields may be missed in array returned from user handler). 2011-12-22 15:33:48 +00:00
Gustavo André dos Santos Lopes 74d2b2f0bd - Fixed bug #60455: stream_get_line misbehaves if EOF is not detected together
with the last read.
2011-12-11 21:08:15 +00:00
Gustavo André dos Santos Lopes 08f78070a5 - Fixed borked refactoring in r307437 (using SUCCESS/FAILURE return instead of
out parameter).
- Fixed signature of php_stream_copy_to_stream_ex to return int in 5.4/trunk
  instead of size_t, as the function only returns SUCCESS/FAILURE.
2011-09-04 22:36:33 +00:00
Xinchen Hui 9fb62f3382 Sync r314808 to 5_3 branch
Eliminated compiler warnings "comparison is always false",  "cast to pointer from integer of different siz" and tail zero warnings
2011-08-23 10:18:48 +00:00
Xinchen Hui 0630945ac4 Avoiding strcpy, strcat, sprintf usage to make static analyzer happy 2011-08-09 12:16:58 +00:00
Gustavo André dos Santos Lopes 987c843674 - Fixed bug #52935 (call exit in user_error_handler cause stream relate core). 2011-07-05 16:09:06 +00:00
Ilia Alshanetsky d846d0e80a Fixed bug #51997 (SEEK_CUR with 0 value, returns a warning). 2011-06-05 21:57:01 +00:00
Hannes Magnusson 3b030ec75f Fixed bug #54946 (stream_get_contents infinite loop) 2011-05-29 12:29:19 +00:00
Gustavo André dos Santos Lopes 8f77168384 - Merged to 5.3 change in trunk in _php_stream_free. This prevents the segfault
in the testcase for bug #53624. The testcase still has to be fixed though,
  because it only works as intended on Windows.
2011-05-08 19:59:42 +00:00
Gustavo André dos Santos Lopes 02302812e1 - Fixed accidental change. 2011-05-01 04:16:28 +00:00
Gustavo André dos Santos Lopes 6df67ace20 - Fixed bug #54623 (Segfault when when writing to a persistent socket after
closing a copy of the socket).
2011-05-01 03:57:01 +00:00
Pierrick Charron e8486cc374 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Adam Harvey 521e5462ab Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by Chris
Jones.
2011-02-04 10:47:41 +00:00
Gustavo André dos Santos Lopes 36d82e8a85 - Fixed bug #53903 (userspace stream stat callback does not separate the
elements of the returned array before converting them).
2011-02-01 22:55:17 +00:00
Gustavo André dos Santos Lopes da0e2a416f - Fixed several comparisons that always result in true of false
due to signedness of one of the operands, either by removing
  dead code or fixing it.
- Thrown some comments around in php_stream_get_record.
- See http://www.mail-archive.com/internals@lists.php.net/msg49525.html
2011-02-01 18:10:35 +00:00
Pierre Joye af9406de8e - don't continue if no valid option value 2011-01-20 07:38:00 +00:00
Pierre Joye 7f3100976f - no need of assert here 2011-01-20 06:32:59 +00:00
Ilia Alshanetsky c33795b25b Fixed variable re-declaration 2011-01-13 12:56:28 +00:00
Felipe Pena 927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Gustavo André dos Santos Lopes 1045aa2a7c - Fixed bug #52820 (writes to fopencookie FILE* not commited when seeking the
stream).
2010-11-15 18:22:52 +00:00
Gustavo André dos Santos Lopes 8342c36f09 - Renamed php_stream_rep_nonstand_mode to
php_stream_mode_sanitize_fdopen_fopencookie, made it not
  exported and movied it from php_streams.h to
  php_streams_int.h.
2010-11-05 18:53:48 +00:00
Gustavo André dos Santos Lopes 68107ae1c3 - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie fails
with streams opened with, inter alia, the 'xb' mode).
2010-11-05 01:29:08 +00:00
Gustavo André dos Santos Lopes 14a54b903e - Fixed forward stream seeking emulation in streams that don't support seeking
in situations where the read operation gives back less data than requested
  and when there was data in the buffer before the emulation started. Also made
  more consistent its behavior -- should return failure every time less data
  than was requested was skipped.
- Small performance improvement by correcting off-by-one error that generate an
  invalid call to the seek handler or read handler. in _php_stream_seek.
2010-10-13 03:13:29 +00:00
Felipe Pena 6ca2ea7109 - Fixed bug #49215 (make fails on glob_wrapper) 2010-09-10 21:33:50 +00:00
Pierre Joye 13fd8fcded - WS 2010-09-01 10:16:48 +00:00
Pierre Joye 87bf415853 - sb needed only in safemode 2010-09-01 10:13:46 +00:00
Pierre Joye 6396a3272c - add lstat support for Windows 2010-09-01 09:49:53 +00:00
Pierre Joye 0d47dff287 - #51854, fix logic (patch by Tjerk) 2010-05-18 19:39:39 +00:00
Antony Dovgal d2699793e0 fix build 2010-04-08 09:56:18 +00:00
Pierre Joye 517d9bb1f2 - WS 2010-04-08 07:55:35 +00:00
Michael Wallner 5b277c4da0 add backlock socket context option for stream_socket_server(),
which had a hardcoded backlog of 5 at two occurrances
2010-03-11 16:37:24 +00:00
Pierre Joye acc6609a27 - get the right error on windows 2010-02-21 17:44:25 +00:00