~ubuntu-branches/ubuntu/intrepid/unrar-nonfree/intrepid

« back to all changes in this revision

Viewing changes to unpack.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Chris Anderson
  • Date: 2004-12-01 02:22:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041201022256-c3pj5nufp88tdyw6
Tags: 3.4.3-1
* New upstream release 
* Applied Ulf Harnhammar's patch to solve overflows when $HOME was too
  large (closes: #280263).

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
bool Unpack::ReadVMCodePPM()
442
442
{
443
443
  unsigned int FirstByte=PPM.DecodeChar();
 
444
  if ((int)FirstByte==-1)
 
445
    return(false);
444
446
  int Length=(FirstByte & 7)+1;
445
447
  if (Length==7)
446
 
    Length=PPM.DecodeChar()+7;
 
448
  {
 
449
    int B1=PPM.DecodeChar();
 
450
    if (B1==-1)
 
451
      return(false);
 
452
    Length=B1+7;
 
453
  }
447
454
  else
448
455
    if (Length==8)
449
 
      Length=PPM.DecodeChar()*256+PPM.DecodeChar();
 
456
    {
 
457
      int B1=PPM.DecodeChar();
 
458
      if (B1==-1)
 
459
        return(false);
 
460
      int B2=PPM.DecodeChar();
 
461
      if (B2==-1)
 
462
        return(false);
 
463
      Length=B1*256+B2;
 
464
    }
450
465
  Array<byte> VMCode(Length);
451
466
  for (int I=0;I<Length;I++)
452
467
  {