diff -r 1f3c3f2f5b0a -r c711bdda59f4 browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp --- a/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Mon Mar 15 12:44:50 2010 +0200 +++ b/browserutilities/browserdialogsprovider/Src/BrowserDialogsProvider.cpp Wed Mar 31 23:16:40 2010 +0300 @@ -690,11 +690,14 @@ HBufC*& aReturnedInput ) { TBool retVal; - - // defInput is not modified by the dialog. - TPtr defInput( (TUint16*) aDefaultInput.Ptr(), aDefaultInput.Length(), - KMaxAltTextLength ); - + TInt length = aDefaultInput.Length(); + if ( aDefaultInput.Length() > KMaxAltTextLength ) + { + length = KMaxAltTextLength; + } + // defInput is not modified by the dialog.Truncate if length is greater than KMaxAltTextLength + TPtr defInput( (TUint16*) aDefaultInput.Ptr(), length, KMaxAltTextLength ); + CBrowserScriptPromptDialog* dialog = new (ELeave) CBrowserScriptPromptDialog( defInput, aReturnedInput );