Browser Crash when search with Google using chinese characters and spaces
Created attachment 11209 [details] changes to the hbuf max size
Comment on attachment 11209 [details] changes to the hbuf max size r=me
3.1m r17335 3.2 r17336
Created attachment 11427 [details] check for more reallocation condition
Created attachment 11429 [details] check for more reallocation condition
Comment on attachment 11429 [details] check for more reallocation condition checkRealloc should take two parameters, the current buffer and the length you want to expand to and return the new buffer. so instead of TBool checkRealloc( HBufC8* aBuf, TPtr8& aPtr, TInt aLen ) you should have something like HBufC8* checkRealloc( TPtrC8& , TInt ) then you dont have to do tricks like this // HBufC8* temp = aBuf->ReAlloc( maxlen + (len == maxlen ? 1 : aLen) );
Created attachment 11438 [details] modified as suggested
Comment on attachment 11438 [details] modified as suggested 1, ptr.Length() + tmpBuf.Length() should be passed to checkRealloc instead of tmpBuf.Length() 2, outBuf->Des().Copy( aPtr ) should be used instead of outBuf->operator=(aPtr); as the buffer that aPtr points to is destroyed right after checkRealloc returns (delete outBuf;) 3, checkRealloc should not leave, it should return null in case of oom.
Created attachment 11441 [details] latest changes
Comment on attachment 11441 [details] latest changes checkRealloc still leaves. please either trap NewMaxL or use a non-leaving version of it. please also make sure that this patch fixes your test case
Created attachment 11445 [details] modified and tested
Comment on attachment 11445 [details] modified and tested r=me
3.1m r17692 3.2 r17693
re-purposing InTSW keyword for use by QtWebkit team