~ubuntu-branches/ubuntu/karmic/xulrunner-1.9/karmic

« back to all changes in this revision

Viewing changes to mozilla/xpcom/string/src/nsTStringObsolete.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-03-05 17:19:38 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20090305171938-em56xsox7j2mfqdq
Tags: 1.9.0.7+nobinonly-0ubuntu1
* security/stability v1.9.0.7 (FIREFOX_3_0_7_RELEASE)
  - USN-728-1
* bump required soft-depends on nspr to >= 4.7.3
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
193
193
      PRBool haveValue = PR_FALSE;
194
194
 
195
195
      while(cp<endcp){
 
196
        PRInt32 oldresult = result;
 
197
 
196
198
        theChar=*cp++;
197
199
        if(('0'<=theChar) && (theChar<='9')){
198
200
          result = (theRadix * result) + (theChar-'0');
246
248
          //we've encountered a char that's not a legal number or sign
247
249
          break;
248
250
        }
 
251
 
 
252
        if (result < oldresult) {
 
253
          // overflow!
 
254
          *aErrorCode = NS_ERROR_ILLEGAL_VALUE;
 
255
          result = 0;
 
256
          break;
 
257
        }
249
258
      } //while
250
259
      if(negate)
251
260
        result=-result;