Jim Meyering <[EMAIL PROTECTED]> wrote:
> Here's a patch for the second memory overrun bug:
>
>       linux.c: Avoid memory overrun.  Handle 2048-byte logical sectors.
>       * libparted/arch/linux.c (linux_read): Allocate the right amount of
>       space for the (potentially 2048-byte-long) sectors we're about to read.

Hmm..., I see that linux_write has the same problem:

        size_t                  write_length = count * dev->sector_size;
          ...
                if (posix_memalign(&diobuf, PED_SECTOR_SIZE_DEFAULT,
                           count * PED_SECTOR_SIZE_DEFAULT) != 0)
          ...
          status = write (arch_specific->fd, diobuf, write_length);

another patch coming up...

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to