Skip to content

Commit

Permalink
fix buffer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Feb 16, 2010
1 parent 7a6646d commit a4105eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/unicode/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a4105eb

Please sign in to comment.