diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-12-16 20:02:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-12-16 21:57:01 +0100 |
commit | 7176211382cc288750273e16ea7eb206854be33f (patch) | |
tree | 1fed6fcbab8e3bfc0c3ed0320a8484ba7414f8de | |
parent | e6aaa9467391488a1399642df67c63f85821dcf9 (diff) |
crashtesting: clamp languagetype param value
e.g. MSVR-34956-mergedlo_utl_ConfigManager-PoC5.rtf
Change-Id: I8bc7d7aa2a188b284750b22716009b835d27c669
Reviewed-on: https://gerrit.libreoffice.org/65229
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | writerfilter/source/rtftok/rtfdispatchvalue.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx index a83d35701020..a72fd00db2c3 100644 --- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx +++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx @@ -501,7 +501,7 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) case RTF_DEFLANG: case RTF_ADEFLANG: { - LanguageTag aTag((LanguageType(nParam))); + LanguageTag aTag((LanguageType(static_cast<sal_uInt16>(nParam)))); auto pValue = new RTFValue(aTag.getBcp47()); putNestedAttribute(m_aStates.top().aCharacterSprms, (nKeyword == RTF_DEFLANG ? NS_ooxml::LN_EG_RPrBase_lang |