--- a/textrendering/textformatting/tagma/TMGLYPH.CPP Wed Jun 09 11:40:52 2010 +0300
+++ b/textrendering/textformatting/tagma/TMGLYPH.CPP Tue Aug 31 17:01:26 2010 +0300
@@ -19,6 +19,11 @@
#include "TMSTD.H"
#include <bidi.h>
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "TMGLYPHTraces.h"
+#endif
+
inline TBool IsSurrogate(TText a) { return 0xD800 == (a & 0xF800); }
@@ -312,6 +317,10 @@
TPtrC text;
aSource.GetText(aStart, text, dummy);
TInt textEnd = aStart + text.Length();
+ if (aStart >= textEnd)
+ {
+ OstTrace0( TRACE_FATAL, DUP1__APPENDTEXTTOBUFFER, "EZeroLengthTextSupplied" );
+ }
__ASSERT_ALWAYS(aStart < textEnd, TmPanic(EZeroLengthTextSupplied));
if (aEnd < textEnd)
{
@@ -413,6 +422,10 @@
TDisplayedTextDirectionality aDirectionality, TText* aBuffer,TUint aContextChar,
TTmCharFormat* aFormat, CTmTextFontCache** aFont)
{
+ if (aStart > aEnd)
+ {
+ OstTrace0( TRACE_DUMP, RTMTEXTCACHE_GETDISPLAYEDTEXT, "EBadArg" );
+ }
__ASSERT_DEBUG(aStart <= aEnd, TmPanic(EBadArg));
if (aContextChar == 0)
aBuffer[0] = 0xFFFF;