summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Laverdiere <marc-andre@atc.tcs.com>2011-07-25 18:07:47 +0530
committerMarc-Andre Laverdiere <marc-andre@atc.tcs.com>2011-07-29 11:15:19 +0530
commita1c11fa56aef80b4a9a47054029613fb06a30832 (patch)
treec07c04c806614231e2f6527e605e9080e16526f3
parent6f32f7f8896dcb21e983adcb61ed400db7389a34 (diff)
Fixed invalid array bounds read in ww8scan.cxx
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 3782dfdd71..9e18737fc8 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6443,7 +6443,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == RTL_TEXTENCODING_DONTKNOW))
eEnc = RTL_TEXTENCODING_MS_1252;
p->sFontname = String(pVer6->szFfn, eEnc);
- if (p->ibszAlt)
+ const sal_uInt16 maxStrSize = SAL_N_ELEMENTS(pVer6->szFfn);
+ if (p->ibszAlt && p->ibszAlt < maxStrSize) //don't start after end of string
{
p->sFontname.Append(';');
p->sFontname += String(pVer6->szFfn+p->ibszAlt, eEnc);