email/pop3andsmtpmtm/servermtmutils/src/imcvrecv.cpp
branchRCL_3
changeset 9 1d7827e39b52
parent 0 72b543305e3a
child 22 1367103c24e2
equal deleted inserted replaced
5:4697dfb2d7ad 9:1d7827e39b52
   252 			}
   252 			}
   253 		else // the line belongs in the current field, we need to keep the leading whitespace
   253 		else // the line belongs in the current field, we need to keep the leading whitespace
   254 			 // Folding headers, RFC 2822, section 2.2.3
   254 			 // Folding headers, RFC 2822, section 2.2.3
   255 			{
   255 			{
   256 			// make sure we're not about to exceed the buffer
   256 			// make sure we're not about to exceed the buffer
   257 			if((iOutputLine->Length() + iInputLine.Length()) > iOutputLine->Des().MaxLength())
   257 			//Restricting the field size of the header to 5000, to avoid -4 error
   258 				iOutputLine = iOutputLine->ReAllocL(iOutputLine->Length() + iInputLine.Length());
   258 			//and which at times ends up in DOS condition [denial of service- user wouldn't be able to download any further mails]. 
   259 
   259 			if (iOutputLine->Length()<5000)
   260 			// now copy the remaining data into the buffer
   260 				{
   261 			iOutputLine->Des().Append(iInputLine);
   261 				if((iOutputLine->Length() + iInputLine.Length()) > iOutputLine->Des().MaxLength())
       
   262 					iOutputLine = iOutputLine->ReAllocL(iOutputLine->Length() + iInputLine.Length());
       
   263 
       
   264 				// now copy the remaining data into the buffer
       
   265 				iOutputLine->Des().Append(iInputLine);
       
   266 			    }
   262 			}
   267 			}
   263 		}
   268 		}
   264 	else
   269 	else
   265 		hitEof = ETrue;		//this means that EEndOfHeader is set if a line of zero length is parsed - ie. (clean CRLF - CRLF) = 0.
   270 		hitEof = ETrue;		//this means that EEndOfHeader is set if a line of zero length is parsed - ie. (clean CRLF - CRLF) = 0.
   266 	iFirstLine = EFalse;
   271 	iFirstLine = EFalse;