Kaydet (Commit) 9f52efa4 authored tarafından Eike Rathke's avatar Eike Rathke

string access out of bounds

Another UniString to OUString conversion fallout.

Change-Id: I5e62b049da3e7f8b5a892ea6aae7110a33564a46
üst c10f132a
...@@ -3173,15 +3173,20 @@ void ScInterpreter::ScCode() ...@@ -3173,15 +3173,20 @@ void ScInterpreter::ScCode()
{ {
//2do: make it full range unicode? //2do: make it full range unicode?
OUString aStr = GetString().getString(); OUString aStr = GetString().getString();
//"classic" ByteString conversion flags if (aStr.isEmpty())
const sal_uInt32 convertFlags = PushInt(0);
RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE | else
RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE | {
RTL_UNICODETOTEXT_FLAGS_FLUSH | //"classic" ByteString conversion flags
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT | const sal_uInt32 convertFlags =
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT | RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE; RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE |
PushInt( (unsigned char) OUStringToOString(OUString(aStr[0]), osl_getThreadTextEncoding(), convertFlags).toChar() ); RTL_UNICODETOTEXT_FLAGS_FLUSH |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
PushInt( (unsigned char) OUStringToOString(OUString(aStr[0]), osl_getThreadTextEncoding(), convertFlags).toChar() );
}
} }
void ScInterpreter::ScChar() void ScInterpreter::ScChar()
......
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