diff options
author | Stanislav Malyshev <stas@php.net> | 2010-02-16 20:34:03 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2010-02-16 20:34:03 +0000 |
commit | a4105ebef996129c88c37f9cc305d4d94aaba0a9 (patch) | |
tree | 46342b40cfd6022260264b8d53c21a50a1433749 /ext/unicode/transform.c | |
parent | 7a6646d9d3d44ec0e89149a04aa6ce67aa21ac76 (diff) | |
download | php-git-a4105ebef996129c88c37f9cc305d4d94aaba0a9.tar.gz |
fix buffer overflow
Diffstat (limited to 'ext/unicode/transform.c')
-rw-r--r-- | ext/unicode/transform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/unicode/transform.c b/ext/unicode/transform.c index 36a95b52d7..9ecf867de2 100644 --- a/ext/unicode/transform.c +++ b/ext/unicode/transform.c @@ -39,9 +39,9 @@ PHP_FUNCTION(str_transliterate) } if (variant) { - id_len = u_snprintf(id, sizeof(id)-1, "%S-%S/%S", from, to, variant); + id_len = u_snprintf(id, TEXT_CHARS(sizeof(id))-1, "%S-%S/%S", from, to, variant); } else { - id_len = u_snprintf(id, sizeof(id)-1, "%S-%S", from, to); + id_len = u_snprintf(id, TEXT_CHARS(sizeof(id))-1, "%S-%S", from, to); } if (id_len < 0) { |