summaryrefslogtreecommitdiff
path: root/README.PARAMETER_PARSING_API
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2002-07-03 18:36:50 +0000
committerSascha Schumann <sas@php.net>2002-07-03 18:36:50 +0000
commitad8b4257a21ba09a66608ce0ced2a8c631539dde (patch)
tree047874d3ab7af8157c43651e8eb1689cfeb327bb /README.PARAMETER_PARSING_API
parent9a743eef77b873af0fa818880a7cc2bf9185e03b (diff)
downloadphp-git-ad8b4257a21ba09a66608ce0ced2a8c631539dde.tar.gz
Please note that you need to use 'int' as a length type when
fetching strings.
Diffstat (limited to 'README.PARAMETER_PARSING_API')
-rw-r--r--README.PARAMETER_PARSING_API9
1 files changed, 8 insertions, 1 deletions
diff --git a/README.PARAMETER_PARSING_API b/README.PARAMETER_PARSING_API
index 0fb2dacce8..788a27d8e6 100644
--- a/README.PARAMETER_PARSING_API
+++ b/README.PARAMETER_PARSING_API
@@ -105,7 +105,14 @@ if (zend_parse_parameters(3 TSRMLS_CC, "zbr!",
/* Get either a set of 3 longs or a string. */
long l1, l2, l3;
char *s;
-long length;
+/*
+ * The function expects a pointer to a integer in this case, not a long
+ * or any other type. If you specify a type which is larger
+ * than a 'int', the upper bits might not be initialized
+ * properly, leading to random crashes on platforms like
+ * Tru64 or Linux/Alpha.
+ */
+int length;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
"lll", &l1, &l2, &l3) == SUCCESS) {