diff options
author | anozdrin/alik@alik. <> | 2006-08-23 21:31:00 +0400 |
---|---|---|
committer | anozdrin/alik@alik. <> | 2006-08-23 21:31:00 +0400 |
commit | 9af756efd309720597962519f28c0f5ab62d1d22 (patch) | |
tree | 33f16ff37ffb4d6166ab1d1376dc7f488cde6df7 /mysql-test/r/trigger.result | |
parent | 28ac53688f6d3049f599d159478a4487eb004773 (diff) | |
download | mariadb-git-9af756efd309720597962519f28c0f5ab62d1d22.tar.gz |
Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.
The fix is to check length of user/host name in parser and if string is too
long, throw an error.
Diffstat (limited to 'mysql-test/r/trigger.result')
-rw-r--r-- | mysql-test/r/trigger.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result index f3e797d2344..b41dd66c390 100644 --- a/mysql-test/r/trigger.result +++ b/mysql-test/r/trigger.result @@ -1089,4 +1089,17 @@ begin set @a:= 1; end| ERROR HY000: Triggers can not be created on system tables +use test| +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1(c INT); +CREATE TABLE t2(c INT); +CREATE DEFINER=1234567890abcdefGHIKL@localhost +TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1; +ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16) +CREATE DEFINER=some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY +TRIGGER t2_bi BEFORE INSERT ON t2 FOR EACH ROW SET @a = 2; +ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60) +DROP TABLE t1; +DROP TABLE t2; End of 5.0 tests |