summaryrefslogtreecommitdiffstats
path: root/util/qlalr
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2010-04-23 14:12:10 (GMT)
committerPeter Hartmann <peter.hartmann@nokia.com>2010-04-27 13:27:10 (GMT)
commit0948393df9b9046db5c3c92a12698aee056d8483 (patch)
treeb1a8dba2cd9c4d5aaa3971369694ef6486c1495d /util/qlalr
parentdaf16a0f6e495aed4e8b68bd4b3fb2eff1c90969 (diff)
downloadQt-0948393df9b9046db5c3c92a12698aee056d8483.zip
Qt-0948393df9b9046db5c3c92a12698aee056d8483.tar.gz
Qt-0948393df9b9046db5c3c92a12698aee056d8483.tar.bz2
fix crash in QXmlStreamReader
this fixes a possible off-by-one data corruption which apparently is only triggered in rare circumstances. The problem was: We were checking whether we would need to reallocate the stack (line 1245), but sometimes were incrementing tos (line 1278) and then accessing the state stack at an out-of-bounds position (line 1951). Additionally, adapt the qlalr generator for changes made to qxmlstream_p.h directly and recreate that file with qlalr. Reviewed-by: Frans Englich Reviewed-by: Roberto Raggi Task-number: QTBUG-9196
Diffstat (limited to 'util/qlalr')
-rw-r--r--util/qlalr/cppgenerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/qlalr/cppgenerator.cpp b/util/qlalr/cppgenerator.cpp
index f52a86f..45de51c 100644
--- a/util/qlalr/cppgenerator.cpp
+++ b/util/qlalr/cppgenerator.cpp
@@ -355,7 +355,7 @@ void CppGenerator::operator () ()
out << startIncludeGuard(grammar.merged_output) << endl;
if (copyright) {
- out << "#if defined(Q_OS_VXWORKS) && defined(ERROR)" << endl
+ out << "#if defined(ERROR)" << endl
<< "# undef ERROR" << endl
<< "#endif" << endl << endl;
}