1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-05 12:42:17 +03:00
Files
mariadb/sql
Davi Arnaut c7163c630a Bug#45010: invalid memory reads during parsing some strange statements
The problem is that the lexer could inadvertently skip over the
end of a query being parsed if it encountered a malformed multibyte
character. A specially crated query string could cause the lexer
to jump up to six bytes past the end of the query buffer. Another
problem was that the laxer could use unfiltered user input as
a signed array index for the parser maps (having upper and lower
bounds 0 and 256 respectively).

The solution is to ensure that the lexer only skips over well-formed
multibyte characters and that the index value of the parser maps
is always a unsigned value.

mysql-test/r/ctype_recoding.result:
  Update test case result: ending backtick is not skipped over anymore.
sql/sql_lex.cc:
  Characters being analyzed must be unsigned as they can be
  used as indexes for the parser maps. Only skip over if the
  string is a valid multi-byte sequence.
tests/mysql_client_test.c:
  Add test case for Bug#45010
2009-08-07 23:32:01 -03:00
..
2008-12-17 15:01:34 -05:00
2008-07-14 16:16:37 -04:00
2008-07-10 14:47:53 -04:00
2007-11-05 20:18:22 +01:00
2008-12-12 14:59:10 +04:00
2008-04-10 15:55:37 -04:00
2009-06-01 16:42:24 +04:00
2009-02-06 18:25:08 +01:00
2009-04-01 16:02:26 +05:00
2009-03-19 09:44:58 -04:00
2008-07-10 14:50:07 -04:00
2008-01-23 13:26:41 -07:00
2009-07-24 16:13:31 +04:00
2007-07-01 15:33:28 -07:00
2009-03-19 09:44:58 -04:00
2009-06-29 15:17:01 +02:00
2008-09-16 13:16:41 +02:00
2009-06-29 15:17:01 +02:00