summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowseglcontext.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-22 21:19:27 -0200
committerThiago Macieira <thiago.macieira@intel.com>2015-01-24 18:35:22 +0100
commit817800ad39df10ca78e2c965a61d4d2025df622b (patch)
treec47b9d29de7ac3e3b75113cc3cd613301059fb32 /src/plugins/platforms/windows/qwindowseglcontext.cpp
parent508b1fa173e135c839f07e0e4cd6009ac63a577c (diff)
Fix QXmlStreamReader parsing of files containing NULs
Due to a flaw in the internal API, QXmlStreamReader's internal buffering would mistake a NUL byte in the input stream for EOF during parsing, but wouldn't set atEnd == true because it hadn't yet processed all bytes. This resulted in an infinite loop in QXmlStreamReaderPrivate::parse. So, instead of returning zero (false) to indicate EOF, return -1 (but in unsigned form, ~0, to avoid ICC warnings of change of sign). In turn, this required enlarging a few variables to avoid ~0U becoming 0xffff, which is a valid QChar (could happen if the input is a QString, not a QIODevice). Task-number: QTBUG-43513 Change-Id: If5badcfd3e4176b79517da1fd108e0abb93a3fd1 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowseglcontext.cpp')
0 files changed, 0 insertions, 0 deletions