~ubuntu-branches/ubuntu/utopic/parted/utopic-proposed

« back to all changes in this revision

Viewing changes to libparted/fs/fat/bootsector.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-04-14 11:56:10 UTC
  • Revision ID: package-import@ubuntu.com-20140414115610-uqo3ngjcok5nsi4w
Tags: 2.3-19ubuntu1
* Upload from Debian git repository to fix a release-critical bug.
* Fix crash when opening FAT file systems (LP: #1306704).

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
}
385
385
 
386
386
int
387
 
fat_info_sector_read (FatInfoSector* is, const PedFileSystem* fs)
 
387
fat_info_sector_read (FatInfoSector** isp, const PedFileSystem* fs)
388
388
{
389
389
        FatSpecific*    fs_info = FAT_SPECIFIC (fs);
390
390
        int             status;
391
391
 
392
 
        PED_ASSERT (is != NULL, return 0);
 
392
        PED_ASSERT (isp != NULL, return 0);
393
393
 
394
 
        if (!ped_geometry_read (fs->geom, is, fs_info->info_sector_offset, 1))
 
394
        if (!ped_geometry_read_alloc (fs->geom, (void **)isp,
 
395
                                      fs_info->info_sector_offset, 1))
395
396
                return 0;
 
397
        FatInfoSector *is = *isp;
396
398
 
397
399
        if (PED_LE32_TO_CPU (is->signature_2) != FAT32_INFO_MAGIC2) {
398
400
                status = ped_exception_throw (PED_EXCEPTION_WARNING,