diff options
author | Felipe Pena <felipe@php.net> | 2011-02-24 02:42:38 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2011-02-24 02:42:38 +0000 |
commit | a82a9e8f748ca79582fa016b6de412b0980af7ea (patch) | |
tree | 6da63be6e6a7a8cb85fc2e2855b9aa7122db3fab | |
parent | f15452af9620f1a13696744ca9091c016d4fae4e (diff) | |
download | php-git-a82a9e8f748ca79582fa016b6de412b0980af7ea.tar.gz |
- Fixed possible off-by-one overflow in ibase_gen_id()
-rw-r--r-- | ext/interbase/interbase.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index fa72cf80c3..bc50175a23 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -1424,6 +1424,11 @@ PHP_FUNCTION(ibase_gen_id) &inc, &link)) { RETURN_FALSE; } + + if (gen_len > 31) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid generator name"); + RETURN_FALSE; + } PHP_IBASE_LINK_TRANS(link, ib_link, trans); |