Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and sanity-checking of unintentional integer overflow, unsigned/zero comparis...
[palacios.git] / palacios / src / devices / ata.h
index d79e012..c6ad4b4 100644 (file)
@@ -215,7 +215,7 @@ static int ata_get_lba_and_size(struct ide_internal * ide, struct ide_channel *
            // we are in CHS mode....
            
            *lba = 
-               (drive->cylinder * drive->num_heads + 
+               ((uint64_t)drive->cylinder * drive->num_heads + 
                 channel->drive_head.head_num) * drive->num_sectors +
                // sector number is 1 based
                (drive->sector_num - 1);