Commit Graph

38 Commits

Author SHA1 Message Date
Nikita Popov
42e32c33e2 More warning fixes 2015-07-17 21:12:15 +02:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Anatol Belski
bfdc9e2805 fix unknown size of void error 2015-06-17 23:43:13 +02:00
Sara Golemon
51a259f378 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix buffer growth in sockets/conversion.c
  Implements extended error messages
2015-06-17 13:34:42 -07:00
Sara Golemon
d241711f44 Fix buffer growth in sockets/conversion.c
memset() the *end* of the new buffer, not the beginning
Copy the pointer to the buffer, not its initial contents

Fixes bug 69619
2015-06-17 13:34:20 -07:00
Dmitry Stogov
1eb4352143 Use new ZEND_HASH_FOREACH_... API. 2015-02-10 15:43:12 +03:00
Xinchen Hui
e98caf27ea found type is unnecessary 2015-02-02 14:45:19 +08:00
Xinchen Hui
942809909e Cleanup resource handling APIs 2015-02-02 13:23:16 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
169701a64c cleanup TSRMLS_FETCH in ext/sockets 2014-09-26 21:09:15 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Nikita Popov
37aaccad7d Use inline functions for most of smart_str
smart_str_free_ex no longer exists, always use smart_str_free instead.

smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Nikita Popov
e06f5f0df8 Drop some unsafe-looking casting code from ext/socket
ZVAL_COPY before convert_to_string is probably not right.
2014-09-05 11:35:41 +02:00
Xinchen Hui
8002e2c06a Fixed discards qualifiers from pointer target type 2014-09-05 09:31:05 +08:00
Anatol Belski
202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
2da1c805ec ported ext/sockets 2014-08-19 13:22:27 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Xinchen Hui
f7f411e4e2 It's okey for use a stack value here (deleted immediately after use) 2014-08-14 12:26:45 +08:00
Xinchen Hui
0d3cd2486a Finish ext/sockets 2014-05-18 12:02:05 +08:00
Xinchen Hui
489da59b08 Refactoring socket (only compilable now) 2014-05-17 10:23:46 +08:00
Rasmus Lerdorf
4a205092f7 Trivial Coverity fix 2013-10-19 17:55:34 -07:00
Gustavo Lopes
710150ccb7 socket: support unix paths in the abstract namespace
Those starting with '\0'.
2013-07-15 23:57:51 +02:00
Gustavo Lopes
e2744f1aa3 socket: fix bug #65260 (SCM_RIGHTS)
The data for messages of type SOL_SOCKET/SCM_RIGHTS was not being
passed correctly. There were actually two bugs: (1) the number of file
descriptors being passed was being read incorrectly (the length of the
cmsg array was being read instead of that of its 'data' element), as a
result it was generally being reported as always three elements
('level', 'type' and 'data') and (2) the allocated block for writing
the file descriptors was being acessed incorrectly because a 1-based
counter was being used as if it was 0-based.

Any of these two bugs would probably be enough to cause heap
corruption.
2013-07-15 23:57:49 +02:00
Gustavo Lopes
8687332e08 Fix bug #64506: fix build with --disable-ipv6 2013-05-08 19:58:27 +02:00
Gustavo Lopes
608254fa57 Fix non-Windows build 2013-02-02 16:38:09 +01:00
Gustavo Lopes
7066cc7267 send/recvmsg() support for Windows 2013-02-02 16:38:09 +01:00
Gustavo Lopes
95f8d34f9c Revert "Payload of HOPLIMIT/TCLASS are 8-bit"
This reverts commit 61a5ec7381ba5388a52926779fe3f58af0caea83.

I checked Linux and OpenBSD and both use integers to write the
IPV6_TCLASS messages and they don't force any endianness. This is
despite RFC 3542 explicitly saying the first byte of cmsg_data will
have the result. In any case, it doesn't make any difference in
little-endian archs.
2013-02-02 16:38:08 +01:00
Gustavo Lopes
5c0a8b1a2a Ensure memory is initialized 2013-02-02 16:38:08 +01:00
Gustavo Lopes
f10baf14ed Payload of HOPLIMIT/TCLASS are 8-bit 2013-02-02 16:38:08 +01:00
Gustavo Lopes
c846fcef68 Fix buf in string -> int conv. 2013-02-02 16:38:08 +01:00
Gustavo Lopes
bd580db373 Build fixes; accept names for if_index 2013-02-02 16:38:08 +01:00
Gustavo Lopes
4414b33abd Refactoring: move stuff to new conversions.c 2013-02-02 16:38:08 +01:00