Invalid read of size 8 in fat_resize()

Bug #1500142 reported by Quiet Dragon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
parted (Ubuntu)
New
Undecided
Unassigned

Bug Description

--- ./libparted/fs/fat/resize.c 2015-09-26 22:51:57.000000000 -0700
+++ ../../libparted/parted-2.3/libparted/fs/fat/resize.c 2015-09-26 22:34:31.527662469 -0700
@@ -667,10 +667,8 @@
   goto error_free_new_fs;

 /* preserve boot code, etc. */
- memcpy (&new_fs_info->boot_sector, &fs_info->boot_sector,
- sizeof (FatBootSector));
- memcpy (&new_fs_info->info_sector, &fs_info->info_sector,
- sizeof (FatInfoSector));
+ new_fs_info->boot_sector = fs_info->boot_sector;
+ new_fs_info->info_sector = fs_info->info_sector;

  new_fs_info->logical_sector_size = fs_info->logical_sector_size;
  new_fs_info->sector_count = new_geom->length;

Revision history for this message
Phillip Susi (psusi) wrote :

A little description to go along with the patch would be good ;)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.