Fix for bug#s 10530, and 10596.

Conditioning the raw buffer by removing the unwanted null chars.


git-svn-id: svn://10.0.0.236/trunk@41738 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
1999-07-31 20:16:30 +00:00
parent 29c7cc1eca
commit fcd30e3c4e
2 changed files with 18 additions and 0 deletions

View File

@@ -1138,6 +1138,15 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin
if(mParserFilter)
mParserFilter->RawBuffer(mParserContext->mTransferBuffer, &theNumRead);
// XXX Hack --- NULL character(s) is(are) seen in the middle of the buffer!!!
// For now, I'm conditioning the raw buffer by removing the unwanted null chars.
// Problem could be NECKO related
for(PRUint32 i=0;i<theNumRead;i++) {
if(mParserContext->mTransferBuffer[i]==kNullCh)
mParserContext->mTransferBuffer[i]=kSpace;
}
#ifdef NS_DEBUG
int index=0;
for(index=0;index<10;index++)

View File

@@ -1138,6 +1138,15 @@ nsresult nsParser::OnDataAvailable(nsIURI* aURL, nsIInputStream *pIStream, PRUin
if(mParserFilter)
mParserFilter->RawBuffer(mParserContext->mTransferBuffer, &theNumRead);
// XXX Hack --- NULL character(s) is(are) seen in the middle of the buffer!!!
// For now, I'm conditioning the raw buffer by removing the unwanted null chars.
// Problem could be NECKO related
for(PRUint32 i=0;i<theNumRead;i++) {
if(mParserContext->mTransferBuffer[i]==kNullCh)
mParserContext->mTransferBuffer[i]=kSpace;
}
#ifdef NS_DEBUG
int index=0;
for(index=0;index<10;index++)