Kaydet (Commit) fb1931f9 authored tarafından Mark Wielaard's avatar Mark Wielaard Kaydeden (comit) Michael Stahl

Robustify MathType::HandleRecords.

Initialize nTag to zero before reading from the stream. In case the
stream is faulty. That will make nRecord equal to END so we drop out
of the do while loop and don't use unitialized variables.

Change-Id: Iad135e8d7f53c41cf8a764e5c7ab0f0cc5ffc6f0
Reviewed-on: https://gerrit.libreoffice.org/4759Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 3a87ba97
...@@ -670,6 +670,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector, ...@@ -670,6 +670,7 @@ int MathType::HandleRecords(int nLevel,sal_uInt8 nSelector,
do do
{ {
nTag = 0;
*pS >> nTag; *pS >> nTag;
nRecord = nTag&0x0F; nRecord = nTag&0x0F;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment