summaryrefslogtreecommitdiff
path: root/sql/gstream.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-10-03 13:35:35 +0500
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-10-03 13:35:35 +0500
commitae3d4bfc0e5dc8c88ce93496bf01018ea2b298bf (patch)
treeb90be499964cfb3ac22a30245fc2c5abafdb9396 /sql/gstream.cc
parent732f05a642279a569c6ed2b67fafff05b9de76c3 (diff)
downloadmariadb-git-ae3d4bfc0e5dc8c88ce93496bf01018ea2b298bf.tar.gz
Bug #30955 geomfromtext() crasher.
end-of-line check missed in Gis_read_stream::get_next_word, what can lead to crashes (expecially with NULL strings). End-of-line check added sql/gstream.cc: Bug #30955 geomfromtext() crasher mysql-test/r/gis.result: Bug #30955 geomfromtext() crasher. test result mysql-test/t/gis.test: Bug #30955 geomfromtext() crasher. test case
Diffstat (limited to 'sql/gstream.cc')
-rw-r--r--sql/gstream.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/gstream.cc b/sql/gstream.cc
index f7d11d76b0c..f986d9dc7f3 100644
--- a/sql/gstream.cc
+++ b/sql/gstream.cc
@@ -45,7 +45,7 @@ bool Gis_read_stream::get_next_word(LEX_STRING *res)
skip_space();
res->str= (char*) m_cur;
/* The following will also test for \0 */
- if (!my_isvar_start(&my_charset_bin, *m_cur))
+ if ((m_cur >= m_limit) || !my_isvar_start(&my_charset_bin, *m_cur))
return 1;
/*