rfc:range_checks_for_64_bit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:range_checks_for_64_bit [2015/08/24 16:09] – ab | rfc:range_checks_for_64_bit [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Range checks for external | + | ====== PHP RFC: Range checks for external |
* Version: 0.9 | * Version: 0.9 | ||
* Date: 2015-08-24 | * Date: 2015-08-24 | ||
* Author: Anatol Belski, ab@php.net | * Author: Anatol Belski, ab@php.net | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
Line 42: | Line 42: | ||
#define ZEND_SIZE_T_INT_OVFL(size) ((size) > (size_t)INT_MAX) | #define ZEND_SIZE_T_INT_OVFL(size) ((size) > (size_t)INT_MAX) | ||
- | #define ZEND_SIZE_T_UINT_OVFL(size) ((size) > (size_t)UINT_MAX) | + | |
+ | #if SIZEOF_INT == SIZEOF_SIZE_T | ||
+ | # define ZEND_SIZE_T_UINT_OVFL(size) (0) | ||
+ | #else | ||
+ | # define ZEND_SIZE_T_UINT_OVFL(size) ((size) > (size_t)UINT_MAX) | ||
+ | #endif | ||
</ | </ | ||
Line 188: | Line 193: | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
- | The implementation of the base functionality is trivial and can be done if the proposed strategy is accepted. Many places in the core extensions related to libxml2, openssl, tidy, etc. are obvious and can be addressed | + | The implementation of the base functionality is trivial and can be done if the proposed strategy is accepted. Many places in the core extensions related to libxml2, openssl, tidy, etc. are obvious and will be addressed already before |
===== Implementation ===== | ===== Implementation ===== |
rfc/range_checks_for_64_bit.1440432595.txt.gz · Last modified: 2017/09/22 13:28 (external edit)