(file) Return to XmlReader.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.92 and 1.93

version 1.92, 2003/10/16 23:25:03 version 1.93, 2003/10/17 21:00:45
Line 902 
Line 902 
     return true;     return true;
 } }
  
 static inline Uint8 _hexCharToNumeric(const char c)  inline Uint8 _xmlReader_hexCharToNumeric(const char c)
 { {
     Uint8 n;     Uint8 n;
  
Line 943 
Line 943 
  
             }             }
  
             Uint8 digit1 = _hexCharToNumeric(char(uriString[++i]));              Uint8 digit1 = _xmlReader_hexCharToNumeric(char(uriString[++i]));
             Uint8 digit2 = _hexCharToNumeric(char(uriString[++i]));              Uint8 digit2 = _xmlReader_hexCharToNumeric(char(uriString[++i]));
             if ( (digit1 > 15) || (digit2 > 15) )             if ( (digit1 > 15) || (digit2 > 15) )
             {             {
               // l10n               // l10n
Line 1033 
Line 1033 
                 x = x << 4;                 x = x << 4;
  
                 // Make sure we don't overflow when we add the next digit                 // Make sure we don't overflow when we add the next digit
                 Sint64 newDigit = Sint64(_hexCharToNumeric(*p++));                  Sint64 newDigit = Sint64(_xmlReader_hexCharToNumeric(*p++));
                 if (PEGASUS_SINT64_MIN - x > -newDigit)                 if (PEGASUS_SINT64_MIN - x > -newDigit)
                 {                 {
                     return false;                     return false;
Line 1153 
Line 1153 
                 x = x << 4;                 x = x << 4;
  
                 // We can't overflow when we add the next digit                 // We can't overflow when we add the next digit
                 Uint64 newDigit = Uint64(_hexCharToNumeric(*p++));                  Uint64 newDigit = Uint64(_xmlReader_hexCharToNumeric(*p++));
                 if (PEGASUS_UINT64_MAX - x < newDigit)                 if (PEGASUS_UINT64_MAX - x < newDigit)
                 {                 {
                     return false;                     return false;
Line 4718 
Line 4718 
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END
   


Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2