diff options
author | Marc-Andre Laverdiere <marc-andre@atc.tcs.com> | 2011-07-25 18:07:47 +0530 |
---|---|---|
committer | Marc-Andre Laverdiere <marc-andre@atc.tcs.com> | 2011-07-29 11:15:19 +0530 |
commit | db68b261df95af1aea8ad6ef569898eac07fd5fa (patch) | |
tree | 667c042e98516d10629f265c50874b6bb5b4290b /sw | |
parent | a64094c6ffe399655272daf7f9fcd57027252900 (diff) |
Fixed invalid array bounds read in ww8scan.cxx
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 6e7e132fc77c..ac92dd268a09 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); |