diff options
author | Marc-Andre Laverdiere <marc-andre@atc.tcs.com> | 2011-07-25 18:07:47 +0530 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-09 11:17:07 +0100 |
commit | 0772860756b7646391ade432e069032dd6d8d277 (patch) | |
tree | 0d1ddaca94dc4538a74b84309cb314359b9ef048 | |
parent | 443fbeeabc95cd6f38df094bb243ee3fc03bc1f5 (diff) |
Fixed invalid array bounds read in ww8scan.cxx
(cherry picked from commit a1c11fa56aef80b4a9a47054029613fb06a30832)
-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 804b016977..bc25f1adbb 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -6298,7 +6298,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); |