com php-src: Fixed string lengths: ext/standard/basic_functio ns.c
| From: | Dmitry Stogov | Date: | Wed, 05 Mar 2014 12:04:28 +0000 |
| Subject: | com php-src: Fixed string lengths: ext/standard/basic_functio ns.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77761@lists.php.net to get a copy of this message | ||
Commit: da75df6faa19cfd6239661d5dddd865cf6616ed3
Author: Dmitry Stogov <dmitry@zend.com> Wed, 5 Mar 2014 16:04:28 +0400
Parents: 7320abbaa94ec4d7ee22f57bb1d6f640099acd74
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=da75df6faa19cfd6239661d5dddd865cf6616ed3
Log:
Fixed string lengths
Changed paths:
M ext/standard/basic_functions.c
Diff:
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 46ea0f5..71a1925 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -4760,10 +4760,10 @@ PHP_FUNCTION(error_get_last)
if (PG(last_error_message)) {
array_init(return_value);
- add_assoc_long_ex(return_value, "type", sizeof("type"), PG(last_error_type));
- add_assoc_string_ex(return_value, "message", sizeof("message"),
PG(last_error_message), 1);
- add_assoc_string_ex(return_value, "file", sizeof("file"),
PG(last_error_file)?PG(last_error_file):"-", 1 );
- add_assoc_long_ex(return_value, "line", sizeof("line"),
PG(last_error_lineno));
+ add_assoc_long_ex(return_value, "type", sizeof("type")-1,
PG(last_error_type));
+ add_assoc_string_ex(return_value, "message", sizeof("message")-1,
PG(last_error_message), 1);
+ add_assoc_string_ex(return_value, "file", sizeof("file")-1,
PG(last_error_file)?PG(last_error_file):"-", 1 );
+ add_assoc_long_ex(return_value, "line", sizeof("line")-1,
PG(last_error_lineno));
}
}
/* }}} */