amassari    2004/07/06 08:57:55

  Modified:    c/src/xercesc/internal DGXMLScanner.cpp IGXMLScanner2.cpp
                        SGXMLScanner.cpp WFXMLScanner.cpp
               c/src/xercesc/validators/DTD DTDScanner.cpp
  Log:
  Fix for jira#1226: when a 32 bit entity is encountered, reset the secondCh variable 
after using it
  
  Revision  Changes    Path
  1.51      +7 -1      xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp
  
  Index: DGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/DGXMLScanner.cpp,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- DGXMLScanner.cpp  28 Jun 2004 18:35:27 -0000      1.50
  +++ DGXMLScanner.cpp  6 Jul 2004 15:57:55 -0000       1.51
  @@ -2745,7 +2745,10 @@
               toFill.append(nextCh);
   
               if (secondCh)
  +            {
                   toFill.append(secondCh);
  +                secondCh=0;
  +            }
           }
       }
       catch(const EndOfEntityException&)
  @@ -3064,7 +3067,10 @@
                   toUse.append(nextCh);
   
                   if (secondCh)
  +                {
                       toUse.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException& toCatch)
  
  
  
  1.66      +11 -3     xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp
  
  Index: IGXMLScanner2.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner2.cpp,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- IGXMLScanner2.cpp 28 Jun 2004 18:35:27 -0000      1.65
  +++ IGXMLScanner2.cpp 6 Jul 2004 15:57:55 -0000       1.66
  @@ -2183,7 +2183,10 @@
                   toFill.append(nextCh);
   
                   if (secondCh)
  +                {
                       toFill.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException&)
  @@ -2401,8 +2404,10 @@
               toFill.append(nextCh);
   
               if (secondCh)
  -               toFill.append(secondCh);
  -
  +            {
  +                toFill.append(secondCh);
  +                secondCh=0;
  +            }
   
               if(fGrammarType == Grammar::SchemaGrammarType)
                   ((SchemaElementDecl 
*)fElemStack.topElement()->fThisElement)->updateValidityFromAttribute((SchemaAttDef 
*)attDef);
  @@ -2793,7 +2798,10 @@
                   toUse.append(nextCh);
   
                   if (secondCh)
  +                {
                       toUse.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException& toCatch)
  
  
  
  1.88      +7 -1      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- SGXMLScanner.cpp  6 Jul 2004 15:09:21 -0000       1.87
  +++ SGXMLScanner.cpp  6 Jul 2004 15:57:55 -0000       1.88
  @@ -4078,7 +4078,10 @@
                   toFill.append(nextCh);
   
                   if (secondCh)
  +                {
                       toFill.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException&)
  @@ -4442,7 +4445,10 @@
                   toUse.append(nextCh);
   
                   if (secondCh)
  +                {
                       toUse.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException& toCatch)
  
  
  
  1.23      +8 -2      xml-xerces/c/src/xercesc/internal/WFXMLScanner.cpp
  
  Index: WFXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/WFXMLScanner.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- WFXMLScanner.cpp  7 Apr 2004 14:14:33 -0000       1.22
  +++ WFXMLScanner.cpp  6 Jul 2004 15:57:55 -0000       1.23
  @@ -1752,7 +1752,10 @@
               toFill.append(nextCh);
   
               if (secondCh)
  -               toFill.append(secondCh);
  +            {
  +                toFill.append(secondCh);
  +                secondCh=0;
  +            }
           }
       }
       catch(const EndOfEntityException&)
  @@ -2043,7 +2046,10 @@
                   toUse.append(nextCh);
   
                   if (secondCh)
  +                {
                       toUse.append(secondCh);
  +                    secondCh=0;
  +                }
               }
           }
           catch(const EndOfEntityException& toCatch)
  
  
  
  1.33      +10 -1     xml-xerces/c/src/xercesc/validators/DTD/DTDScanner.cpp
  
  Index: DTDScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/DTD/DTDScanner.cpp,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- DTDScanner.cpp    29 Jan 2004 11:52:30 -0000      1.32
  +++ DTDScanner.cpp    6 Jul 2004 15:57:55 -0000       1.33
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.33  2004/07/06 15:57:55  amassari
  + * Fix for jira#1226: when a 32 bit entity is encountered, reset the secondCh 
variable after using it
  + *
    * Revision 1.32  2004/01/29 11:52:30  cargilld
    * Code cleanup changes to get rid of various compiler diagnostic messages.
    *
  @@ -1126,7 +1129,10 @@
               toFill.append(nextCh);
   
               if (secondCh)
  -               toFill.append(secondCh);
  +            {
  +                toFill.append(secondCh);
  +                secondCh=0;
  +            }
           }
       }
   
  @@ -2431,7 +2437,10 @@
           toFill.append(nextCh);
   
           if (secondCh)
  +        {
               toFill.append(secondCh);
  +            secondCh=0;
  +        }
       }
   
       //
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to